QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#188339 | #6642. (1, 2) Nim | rsj | WA | 0ms | 3676kb | C++14 | 284b | 2023-09-25 19:11:58 | 2023-09-25 19:11:58 |
Judging History
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'