QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#188339#6642. (1, 2) NimrsjWA 0ms3676kbC++14284b2023-09-25 19:11:582023-09-25 19:11:58

Judging History

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

  • [2023-09-25 19:11:58]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3676kb
  • [2023-09-25 19:11:58]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int a[100010];
void get() {
	int n,i,x=0;
	cin>>n; for(i=1;i<=n;i++) {
		cin>>a[i];
		if(a[i]==1) x++;
	}
	if(x%3==1) cout<<"Sprague\n";
	else cout<<"Grundy\n"; 
}
int main() {
	int T; cin>>T; while(T--) get();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3676kb

input:

3
2
1 2
1
5
4
1 7 2 9

output:

Sprague
Grundy
Sprague

result:

wrong answer 1st lines differ - expected: 'Grundy', found: 'Sprague'