Submission #7032

#TimeUsernameProblemLanguageResultExecution timeMemory
7032gs13068CATS (NOI14_cats)C++98
0 / 25
92 ms1088 KiB
#include<cstdio> int main() { long long tc; scanf("%lld",&tc); while(tc--) { long long t=0; long long i,j,x,l,n; scanf("%lld%lld%lld",&x,&l,&n); n<<=1; i=(l+n-1)/n; if(i>60)j=62; else if(i>1)j=i+1; else j=2; x=(x-1)&((1<<j)-1); if(i*n==l) { } else { for(x=(x-1)&((1<<j)-1);x;x>>=1)t^=x&1; printf("%lld\n",i*n+t); } } }
#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...