Submission #1111553

#TimeUsernameProblemLanguageResultExecution timeMemory
1111553BananabreadCATS (NOI14_cats)C++17
4 / 25
272 ms6216 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--; k%=(l/(2*n)+2); 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...