# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
448759 |
2021-08-01T12:25:44 Z |
UltraFalcon |
Rack (eJOI19_rack) |
C++17 |
|
1 ms |
460 KB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
const int limit = (1e9) + 7;
int n, k;
cin >> n >> k;
k--;
int i = n-1;
int r = 1;
while (i >= 0) {
if (k % 2 == 1) {
assert(i < 5);
r = (r + ((1 << i) % limit)) % limit;
}
k /= 2;
i--;
}
cout << r % limit << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |