Submission #13929

#TimeUsernameProblemLanguageResultExecution timeMemory
13929gs14004배낭 문제 준비하기 (GA9_invknapsack)C++14
0 / 100
0 ms1240 KiB
#include <cstdio> #include <vector> typedef long long lint; using namespace std; lint bino[64][64], t; int main(){ scanf("%lld",&t); for (int i=0; i<64; i++) { bino[i][0] = 1; for (int j=1; j<=i; j++) { bino[i][j] = bino[i-1][j-1] + bino[i-1][j]; } } vector<int> v; for (int i=0; i<64; i++) { v.push_back(1); } for (int i=31; i>=0; i--) { while(t >= bino[63][i]){ t -= bino[63][i]; v.push_back(300 - i); } } printf("%d 300\n",(int)v.size()); for (auto &i : v){ printf("%d ",i); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...