QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#310275#5544. Grid GameLeeShoW#WA 1ms4536kbC++14482b2024-01-21 10:10:142024-01-21 10:10:14

Judging History

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

  • [2024-01-21 10:10:14]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:4536kb
  • [2024-01-21 10:10:14]
  • 提交

answer

#include<iostream>
#include<cstring>
#include<vector>
using namespace std;
const int N=505;
int n,m,now=0;
int v[N][N]={};
signed main(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    memset(v,-1,sizeof(v));
    cin>>n>>m;
    for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) cin>>v[i][j];
    for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) if(v[i][j]!=-1&&v[i+1][j]==-1&&v[i][j+1]==-1) now^=v[i][j];
    if(now) cout<<"First\n";
    else cout<<"Second\n";
}

详细

Test #1:

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

input:

5 6
0 0 0 0 0 0
0 3 3 0 0 0
0 0 3 -1 0 0
0 0 3 3 3 3
0 0 -1 -1 -1 -1

output:

First

result:

wrong answer 1st lines differ - expected: 'first', found: 'First'