# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
290823 | gs14004 | CATS (NOI14_cats) | C++17 | 106 ms | 8004 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <cstring>
using lint = long long;
int main(){
int q;
scanf("%d",&q);
while (q--) {
lint x, l, n;
scanf("%lld %lld %lld",&x,&l,&n);
x--;
lint Q = l / (2 * n) + 2;
if(Q <= 61) x %= (1ll << Q);
printf("%lld\n", (Q - 1) * (2 * n) +__builtin_popcountll(x) % 2);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |