You are viewing a single comment's thread. Return to all comments →
O(1) Solution for CPU's having builtin "popcnt" instruction.
int main() { int tc; cin >> tc; while (tc--) { unsigned long long n; cin >> n; cout << (_popcnt64(n - 1) & 1 ? "Louise" : "Richard") << endl; } return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Counter game
You are viewing a single comment's thread. Return to all comments →
O(1) Solution for CPU's having builtin "popcnt" instruction.