Submission #596778

#TimeUsernameProblemLanguageResultExecution timeMemory
596778CookieRack (eJOI19_rack)C++14
40 / 100
23 ms17472 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...