Submission #466221

# Submission time Handle Problem Language Result Execution time Memory
466221 2021-08-18T11:22:17 Z Stickfish Rack (eJOI19_rack) C++17
40 / 100
3 ms 2368 KB
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;

signed main(){
	ll n, k;
	cin >> n >> k;
	--k;
	if(n <= 20){
		vector<ll> a = {1};
		for(int sz = 1, pw = (1 << (n - 1)); sz <= k; sz *= 2, pw /= 2){
			for(int i = 0; i < sz; ++i){
				a.push_back(a[i] + pw);	
			}
		}
		cout << a[k] << endl;
	}
}
# 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 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
# 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 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 840 KB Output is correct
9 Correct 3 ms 2368 KB Output is correct
10 Correct 3 ms 2368 KB Output is correct
# 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 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 840 KB Output is correct
9 Correct 3 ms 2368 KB Output is correct
10 Correct 3 ms 2368 KB Output is correct
11 Incorrect 0 ms 204 KB Output isn't correct
12 Halted 0 ms 0 KB -