QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#139633#6642. (1, 2) NimFzArKWA 1ms3628kbC++171.4kb2023-08-14 06:29:422023-08-14 06:29:43

Judging History

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

  • [2023-08-14 06:29:43]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3628kb
  • [2023-08-14 06:29:42]
  • 提交

answer

#include<bits/stdc++.h>
#include <stdio.h>
#include <algorithm>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define sc(x) scanf("%d", &x)
#define scl(x) scanf("%lld", &x)
#define clr(x) vector<int>().swap(x);
#define all(x) x.begin(), x.end()
#define sz(x) x.size()
#define endl '\n'
#define pb push_back
#define pf push_front
#define mp make_pair
#define popb pop_back
#define popf pop_front
#define ll long long
#define ld long double
#define ull unsigned long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define random mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define F first
#define S second
const ll INF=1e18;
const ll MN=-2e9;
const ll MX=2e5+9;
const ll MXX=2e9;
const ll SQ=4e2;
const ll MOD=998244353;
const ll PP=1e6+3;
const ld PI=3.141592653589793;
const ld eps=1e-11;
typedef tree<ll, null_type, less_equal<ll>, rb_tree_tag, tree_order_statistics_node_update>
    ordered_set;

int n, a[MX];

void solve() {
    cin >> n;
    for (int i=1; i<=n; i++) cin >> a[i];
    cout << (n == 1 ? "Sprague" : "Grundy") << endl;
}

int main() {
    FAST;
    int t = 1;
    cin >> t;
    while (t--) {
        solve();
    }
}

/*



*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3464kb

input:

3
2
1 2
1
5
4
1 7 2 9

output:

Grundy
Sprague
Grundy

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3628kb

input:

11337
9
4 1 2 3 2 4 3 2 3
10
1 7 1 5 1 2 2 2 1 3
9
1 3 7 3 3 1 1 3 2
12
1 1 2 4 1 2 2 4 2 2 1 4
15
1 3 4 3 1 2 1 4 1 1 1 1 1 1 1
8
3 3 2 2 3 9 1 2
10
2 2 2 2 1 5 1 2 7 2
10
2 2 2 3 2 2 3 5 2 2
7
2 2 6 2 2 3 5
10
1 1 1 3 1 1 1 5 1 1
8
2 2 2 2 5 2 10 1
5
3 10 1 3 1
8
3 4 2 2 1 1 11 1
6
6 4 8 2 4 2
10
...

output:

Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy
Grundy...

result:

wrong answer 22nd lines differ - expected: 'Sprague', found: 'Grundy'