We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 342c766 commit 24687bdCopy full SHA for 24687bd
khj20006/202511/11 BOJ P2 아인타 게임.md
@@ -0,0 +1,23 @@
1
+```cpp
2
+#include <bits/stdc++.h>
3
+using namespace std;
4
+
5
+int main() {
6
+ cin.tie(0)->sync_with_stdio(0);
7
8
+ long long T, N, M, K;
9
+ for (cin >> T; T--;) {
10
+ cin >> K >> N >> M;
11
+ N--, M--;
12
+ if (K == 1) {
13
+ cout << (((N & 1LL) | (M & 1LL)) ? "koosaga\n" : "cubelover\n");
14
+ continue;
15
+ }
16
+ long long z = min(N, M) / (K + 1), zz = z * (K + 1);
17
+ N -= zz, M -= zz;
18
+ long long g = (N < K || M < K) ? ((N & 1LL) ^ (M & 1LL) ^ (z & 1LL)) : (((N & 1LL) ^ (M & 1LL)) | 2LL);
19
+ cout << (g ? "koosaga\n" : "cubelover\n");
20
21
22
+}
23
+```
0 commit comments