QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#130030 | #6376. LaLa and Lamp | Lq67122030 | WA | 1ms | 3772kb | C++14 | 379b | 2023-07-23 14:29:23 | 2023-07-23 14:29:25 |
Judging History
answer
#include <bits/stdc++.h>
#define il inline
using namespace std;
const int N=2005;
int n,a[N][N];
int main(){
scanf("%d",&n);
for(int i=1;i<=n;++i)
for(int j=1;j<=i;++j)
scanf("%1d",a[i]+j);
for(int i=2;i<=n-2;++i)
for(int j=2;j<i;++j)
if(a[i-1][j-1]^a[i-1][j]^a[i][j-1]^a[i][j+1]^a[i+1][j]^a[i+1][j+1]) return puts("No"),0;
puts("Yes");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3476kb
input:
6 0 00 000 0110 00100 000000
output:
Yes
result:
ok answer is YES
Test #2:
score: 0
Accepted
time: 1ms
memory: 3404kb
input:
2 0 11
output:
Yes
result:
ok answer is YES
Test #3:
score: 0
Accepted
time: 1ms
memory: 3420kb
input:
3 1 10 011
output:
Yes
result:
ok answer is YES
Test #4:
score: -100
Wrong Answer
time: 1ms
memory: 3772kb
input:
4 1 11 101 0101
output:
Yes
result:
wrong answer expected NO, found YES