Submission #202071

# Submission time Handle Problem Language Result Execution time Memory
202071 2020-02-13T13:19:03 Z darkkcyan CATS (NOI14_cats) C++14
0 / 25
460 ms 6392 KB
#include<bits/stdc++.h>
using namespace std;

int main() {
    int ntest; cin >> ntest;
    while (ntest--) {
        long long x, l, n; cin >> x >> l >> n;
        x %= 4;
        long long mul = l / n;
        mul += 1 + (~mul & 1);
        mul *= n;
        cout << mul + ((x & 1) ^ (x >> 1)) << '\n';
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 40 ms 632 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 460 ms 6392 KB Output isn't correct
2 Halted 0 ms 0 KB -