# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
7032 |
2014-07-12T22:08:55 Z |
gs13068 |
CATS (NOI14_cats) |
C++ |
|
92 ms |
1088 KB |
#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 time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
92 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |