#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 time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1240 KB |
Output is correct |
2 |
Correct |
0 ms |
1240 KB |
Output is correct |
3 |
Correct |
0 ms |
1240 KB |
Output is correct |
4 |
Correct |
0 ms |
1240 KB |
Output is correct |
5 |
Correct |
0 ms |
1240 KB |
Output is correct |
6 |
Correct |
0 ms |
1240 KB |
Output is correct |
7 |
Correct |
0 ms |
1240 KB |
Output is correct |
8 |
Correct |
0 ms |
1240 KB |
Output is correct |
9 |
Correct |
0 ms |
1240 KB |
Output is correct |
10 |
Correct |
0 ms |
1240 KB |
Output is correct |
11 |
Incorrect |
0 ms |
1240 KB |
Output isn't correct - the number of ways is not correct |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |