# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
929465 |
2024-02-18T05:45:42 Z |
hngr |
Rack (eJOI19_rack) |
C++14 |
|
1000 ms |
348 KB |
#include <iostream>
#include <vector>
#include <set>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#define int long long
const int mod = 1e9+7;
using namespace std;
int32_t main() {
int n, k; cin >> n >> k;
vector<int> y(n+1, 1);
for(int i = 1; i <= n; i ++) y[i] = y[i-1] * 2;
int ind = k;
ind --;
int ans = 1;
while(ind != 0){
(ans += (y[n-ind-1] % mod)) %= mod;
ind -= y[ind];
}
cout << ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1041 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1041 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1041 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |