일산짱
BOJ)3777 Computer Transformation
처음문자열은 1 이후 한 step마다 1은 01 ,0은 10되고 문자열에서 00의 갯수를 찾는문제이다.답이 약 2^1000 정도까지 증가할수 있어서 c++ BigInteger 소스를 사용했다.
알고리듬
2017. 10. 10. 16:18
c++ BigInteger
#include#include#include#include#include#include#includeusing namespace std; typedef int64_t ll; #define EL printf("\n") #define pb push_back #define FOR(i,l,r) for (int i=l;i=l;i--) const int base = 1e9; typedef vector BigInt; void Set(BigInt &a) { while (a.size() > 1 && a.back() == 0) a.pop_back(); } void Print(BigInt a) { Set(a); printf("%d", (a.size() == 0) ? 0 : a.back()); FORD(i,a.size()-2..
알고리듬
2017. 10. 10. 15:34
티스토리 가입했어요
문제를 열심히 풀어야겠어요
카테고리 없음
2017. 10. 9. 19:55