QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#811191 | #9670. GG and YY’s Stone Game | Kuonji_Alice_ | WA | 0ms | 3708kb | C++23 | 558b | 2024-12-12 16:19:01 | 2024-12-12 16:19:06 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int v1 = 0, v2 = 0;
void solve(){
int n;cin >> n;
if(n <= 2) {
v1 ++;
cout << 0 << ' ' << v1 << '\n';
return;
}
if(n == 3) {
v2 ++;
cout << 1 << ' ' << v2 << '\n';
return;
}
if((n - 2) % 3 == 0 || (n - 1) % 3 == 0){
v1 ++;
cout << 0 << ' ' << v1 << '\n';
return;
}
v2 ++;
cout << 1 << ' ' << v2 << '\n';
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;cin >> t;
while(t --) solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3656kb
input:
3 1 2 3
output:
0 1 0 2 1 1
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3708kb
input:
10000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
0 1 0 2 1 1 0 3 0 4 1 2 0 5 0 6 1 3 0 7 0 8 1 4 0 9 0 10 1 5 0 11 0 12 1 6 0 13 0 14 1 7 0 15 0 16 1 8 0 17 0 18 1 9 0 19 0 20 1 10 0 21 0 22 1 11 0 23 0 24 1 12 0 25 0 26 1 13 0 27 0 28 1 14 0 29 0 30 1 15 0 31 0 32 1 16 0 33 0 34 1 17 0 35 0 36 1 18 0 37 0 38 1 19 0 39 0 40 1 20 0 41 0 42 1 21 0 4...
result:
wrong answer 4th lines differ - expected: '0 2', found: '0 3'