# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
7692 |
2014-08-14T12:15:58 Z |
tncks0121 |
CATS (NOI14_cats) |
C++ |
|
92 ms |
1088 KB |
#include <stdio.h>
typedef long long ll;
ll X,L,N;
int main() {
for(scanf("%*d");3==scanf("%lld%lld%lld",&X,&L,&N); ){
ll res = 0;
ll T = (X & ((1ll<<(L/(2*N)+2))-1)) - 1;
for(int i = 0; i < 60; i++) if((T >> i) & 1) ++res;
res &= 1;
res += 2*N + L/(2*N)*(2*N);
printf("%lld\n", res);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1088 KB |
Output is correct |
2 |
Correct |
0 ms |
1088 KB |
Output is correct |
3 |
Correct |
0 ms |
1088 KB |
Output is correct |
4 |
Correct |
0 ms |
1088 KB |
Output is correct |
5 |
Correct |
0 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1088 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
# |
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 |
8 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 |
- |