QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#462976#6642. (1, 2) Nimgrass8cow#WA 0ms3736kbC++17287b2024-07-04 10:44:532024-07-04 10:44:54

Judging History

你现在查看的是最新测评结果

  • [2024-07-04 10:44:54]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3736kb
  • [2024-07-04 10:44:53]
  • 提交

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'