QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#310275 | #5544. Grid Game | LeeShoW# | WA | 1ms | 4536kb | C++14 | 482b | 2024-01-21 10:10:14 | 2024-01-21 10:10:14 |
Judging History
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";
}
Details
Tip: Click on the bar to expand more detailed information
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'