Submission #1154370

#TimeUsernameProblemLanguageResultExecution timeMemory
1154370FaggiRack (eJOI19_rack)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define ll long long using namespace std; const int MOD=1e9+7; ll calc(ll act, ll l, ll r) { ll m=(l+r)/2; if(l==r) return l%MOD; if(act%2!=0) { return calc(act/2,m+1,r); } return calc(act/2,l, m); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll n, k, tam, act; cin >> n >> k; tam=1ll<<n; tam=tam%MOD; K=K%MOD; act=k-1; cout << calc(act, 1, tam); return 0; }

Compilation message (stderr)

rack.cpp: In function 'int main()':
rack.cpp:27:5: error: 'K' was not declared in this scope
   27 |     K=K%MOD;
      |     ^