# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
201205 |
2020-02-09T19:21:47 Z |
MetB |
CATS (NOI14_cats) |
C++14 |
|
456 ms |
2168 KB |
#include <bits/stdc++.h>
#define N 1000001
using namespace std;
typedef long long ll;
const ll INF = 1e18, MOD = 1e9 + 7, MOD2 = 1e6 + 3;
int q;
int main () {
cin >> q;
for (int i = 0; i < q; i++) {
ll x, l, n;
cin >> x >> l >> n;
x--;
if (l / (2 * n) + 1 <= 62) x %= (1LL << (l / (2 * n) + 2));
ll c = 0;
cout << 2 * n * (l / (2 * n) + 1) + c + __builtin_popcountll (x) << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
376 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 |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
44 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
456 ms |
2168 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |