QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#127017 | #6642. (1, 2) Nim | yy_zq# | WA | 1ms | 3412kb | C++14 | 595b | 2023-07-19 12:19:30 | 2023-07-19 12:19:34 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define FOR(i,j,k) for(int i=j;i<=k;++i)
int b[13];
int a[13];
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--){
int n;
cin>>n;
FOR(i,1,n){
cin>>b[i];
}
int ys = 1;
FOR(i,1,n){
if(b[i]>b[i-1]) a[i] = i*10;
if(b[i]==b[i-1]) a[i] = 10-i;
if(b[i]<b[i-1]||b[i]>b[i-1]+1){
ys=0;
}
}
if(ys){
cout<<"YES\n";
FOR(i,1,n) cout<<a[i]<<' ';
cout<<'\n';
}
else cout<<"NO\n";
}
return 0;
}
/*
2
6
1 2 3 4 5 7
4
1 2 2 3
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3412kb
input:
3 2 1 2 1 5 4 1 7 2 9
output:
YES 10 20 NO NO
result:
wrong answer 1st lines differ - expected: 'Grundy', found: 'YES'