QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#471793#6376. LaLa and LampdczissbWA 0ms3684kbC++14605b2024-07-11 08:47:392024-07-11 08:47:40

Judging History

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

  • [2024-07-11 08:47:40]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3684kb
  • [2024-07-11 08:47:39]
  • 提交

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;
}

详细

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