QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#127531#6642. (1, 2) Nimxjsc01WA 1ms3584kbC++23438b2023-07-19 19:23:532023-07-19 19:23:55

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-19 19:23:55]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3584kb
  • [2023-07-19 19:23:53]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int T;
	cin >> T;
	while(T--){
		int n;
		scanf("%d", &n);
		int k = 0;
		for(int i = 1; i <= n; i++){
			int t;
			scanf("%d", &t);
			if(t >= 2) k++;
		}
		bool xian;
		if(k == 0) {
			xian = n % 3 == 1;
		}
		else if(k == 1){
			xian = !(n%3 == 2);
		}
		else{
			xian = 0;
		}
		if(xian) puts("Grundy");
		else puts("Sprague");
	}

	return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3584kb

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'