This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |