Submission #51351

#TimeUsernameProblemLanguageResultExecution timeMemory
51351KieranHorganCATS (NOI14_cats)C++17
0 / 25
87 ms2432 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long #define int long long #define ld long double #define pii pair<int,int> #define rand() abs((rand()<<15)|rand()) #define randll() abs(((long long)rand()<<30)|rand()) signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long long seed; asm("rdtsc" : "=A"(seed)); srand(seed); int q; cin >> q; while(q--) { int X, L, N; cin >> X >> L >> N; int x = L/(2*N); x = (2*N)*(x+1); cout << x+(__builtin_popcountll(X+1)%2) << endl; } }
#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...