QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#462976 | #6642. (1, 2) Nim | grass8cow# | WA | 0ms | 3736kb | C++17 | 287b | 2024-07-04 10:44:53 | 2024-07-04 10:44:54 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void sol(){
int n,e=0;
scanf("%d",&n);while(n--){int a;scanf("%d",&a),e+=(a>1);}
if(n%3==1&&e<=1||n%3==0&&e==1)puts("Sprague");
puts("Grundy");
}
int main(){
int T;scanf("%d",&T);while(T--)sol();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3736kb
input:
3 2 1 2 1 5 4 1 7 2 9
output:
Grundy Grundy Grundy
result:
wrong answer 2nd lines differ - expected: 'Sprague', found: 'Grundy'