Submission #596778

# Submission time Handle Problem Language Result Execution time Memory
596778 2022-07-15T04:27:02 Z Cookie Rack (eJOI19_rack) C++14
40 / 100
23 ms 17472 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vt vector
#define pb push_back
const int mxn = 2e5 + 3;
int n, k;
vt<int>a[21];
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cin >> n >> k;
	a[1].pb(1); a[1].pb(2);
	for(int i = 2; i <= n; i++){
	    for(auto j: a[i - 1]){
	        a[i].pb(j); a[i].pb(j + (1 << (i - 1)));
	    }
	}
	cout << a[n][k - 1];
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 320 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 320 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 3 ms 2488 KB Output is correct
10 Correct 10 ms 8772 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 320 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 3 ms 2488 KB Output is correct
10 Correct 10 ms 8772 KB Output is correct
11 Runtime error 23 ms 17472 KB Execution killed with signal 6
12 Halted 0 ms 0 KB -