# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
727932 | 2023-04-21T15:39:28 Z | rainboy | CATS (NOI14_cats) | C | 67 ms | 7924 KB |
#include <stdio.h> int count(long long b) { return b == 0 ? 0 : count(b & b - 1) + 1; } int main() { int t; scanf("%d", &t); while (t--) { long long k, l, n, d; scanf("%lld%lld%lld", &k, &l, &n), k--, d = (l + n * 2) / (n * 2); printf("%lld\n", d * n * 2 + count(d >= 60 ? k : k % (1LL << d)) % 2); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 284 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 300 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 596 KB | Output is correct |
2 | Incorrect | 5 ms | 596 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 62 ms | 6196 KB | Output is correct |
2 | Incorrect | 67 ms | 7924 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |