QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#471793 | #6376. LaLa and Lamp | dczissb | WA | 0ms | 3684kb | C++14 | 605b | 2024-07-11 08:47:39 | 2024-07-11 08:47:40 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,m,b[2001][2001],a[2001][2001];
bool check(int x,int y){
return a[x][y]^a[x-1][y-1]^a[x-1][y]^a[x-2][y-1];
}
void solve(){
for(int i=3;i<=n;i++){
int x=check(i,2);
for(int j=3;j<i;j++){
if(x!=check(i,j)) return;
}
// if(x) update(i);
}
cout<<"Yes",exit(0);
}
signed main(){
cin>>n;
for(int i=1;i<=n;i++){
for(int j=1;j<=i;j++){
char sb;
cin>>sb;
a[i][j]=sb-'0';
}
}
solve();
a[1][1]^=1;
solve();
a[2][1]^=1,a[2][2]^=1;
solve();
a[1][1]^=1;
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3556kb
input:
6 0 00 000 0110 00100 000000
output:
Yes
result:
ok answer is YES
Test #2:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
2 0 11
output:
Yes
result:
ok answer is YES
Test #3:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
3 1 10 011
output:
Yes
result:
ok answer is YES
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3684kb
input:
4 1 11 101 0101
output:
result:
wrong output format Unexpected end of file - token expected