Submission #202071

#TimeUsernameProblemLanguageResultExecution timeMemory
202071darkkcyanCATS (NOI14_cats)C++14
0 / 25
460 ms6392 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...