# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
237590 |
2020-06-07T15:08:56 Z |
tb_03 |
Rack (eJOI19_rack) |
C++14 |
|
5 ms |
384 KB |
#include <iostream>
#include <math.h>
using namespace std;
typedef unsigned long long ll;
const ll modulo = 1000000007;
int n, k;
ll ans = 1;
void recursiva(int level, int casacos)
{
if (level == 0)
return;
if (casacos % 2 == 0)
recursiva(level - 1, casacos / 2);
else
{
ans = (((ll)powl(2, (level - 1)) % modulo) + ans) % modulo;
recursiva(level - 1, (casacos - 1) / 2);
}
}
int main()
{
cin >> n >> k;
recursiva(n, k - 1);
cout << ans << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
128 KB |
Output is correct |
2 |
Correct |
4 ms |
256 KB |
Output is correct |
3 |
Correct |
5 ms |
256 KB |
Output is correct |
4 |
Correct |
5 ms |
384 KB |
Output is correct |
5 |
Correct |
4 ms |
256 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
128 KB |
Output is correct |
2 |
Correct |
4 ms |
256 KB |
Output is correct |
3 |
Correct |
5 ms |
256 KB |
Output is correct |
4 |
Correct |
5 ms |
384 KB |
Output is correct |
5 |
Correct |
4 ms |
256 KB |
Output is correct |
6 |
Correct |
4 ms |
256 KB |
Output is correct |
7 |
Correct |
5 ms |
256 KB |
Output is correct |
8 |
Correct |
4 ms |
256 KB |
Output is correct |
9 |
Correct |
4 ms |
256 KB |
Output is correct |
10 |
Correct |
5 ms |
256 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
128 KB |
Output is correct |
2 |
Correct |
4 ms |
256 KB |
Output is correct |
3 |
Correct |
5 ms |
256 KB |
Output is correct |
4 |
Correct |
5 ms |
384 KB |
Output is correct |
5 |
Correct |
4 ms |
256 KB |
Output is correct |
6 |
Correct |
4 ms |
256 KB |
Output is correct |
7 |
Correct |
5 ms |
256 KB |
Output is correct |
8 |
Correct |
4 ms |
256 KB |
Output is correct |
9 |
Correct |
4 ms |
256 KB |
Output is correct |
10 |
Correct |
5 ms |
256 KB |
Output is correct |
11 |
Correct |
4 ms |
256 KB |
Output is correct |
12 |
Incorrect |
4 ms |
256 KB |
Output isn't correct |
13 |
Halted |
0 ms |
0 KB |
- |