Submission #1111561

#TimeUsernameProblemLanguageResultExecution timeMemory
1111561BananabreadCATS (NOI14_cats)C++17
16 / 25
287 ms2252 KiB
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll q; cin>>q; while(q--){ ll k,l,n; cin>>k>>l>>n; k--; ll c=(l/(2*n)+2); if(c>62) c=62; k%=(1<<c); cout<<2*n*(l/(2*n)+1)+(__builtin_popcountll(k)%2)<<"\n"; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...