Submission #256017

#TimeUsernameProblemLanguageResultExecution timeMemory
256017tomsydRack (eJOI19_rack)C++17
40 / 100
192 ms102400 KiB
#include <bits/stdc++.h> #define int long long using namespace std; const int mod = 1e9+7; int32_t main(){ ios::sync_with_stdio(0); cin.tie(0); int n,k; cin >> n >> k; vector<int> v1 = {1}; for (int i=0; i<n; ++i){ vector<int> v2; int a = (1<<i); for (int j:v1){ v2.emplace_back(j); v2.emplace_back(j+a); } v1 = v2; } cout << v1[k-1]; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...