QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#442266#8742. 黑白BeforeSun#WA 20ms4772kbC++14400b2024-06-15 10:45:272024-06-15 10:45:28

Judging History

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

  • [2024-06-15 10:45:28]
  • 评测
  • 测评结果:WA
  • 用时:20ms
  • 内存:4772kb
  • [2024-06-15 10:45:27]
  • 提交

answer

#include<bits/stdc++.h>
#define LL long long
using namespace std;
int T,n,m,s;
string Mp[1005];
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>T;
	while(T--){
		cin>>n>>m;
		s=n*m;
		s-=n+m-1;
		for(int i=1;i<=n;++i){
			cin>>Mp[i];
			for(int j=0;j<m;++j) if(Mp[i][j]=='B') s--;
		}
		if(s&1) cout<<'I';
		else cout<<'J';
		cout<<'\n';
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 20ms
memory: 4772kb

input:

100
2 6
WWBBWW
WWWWWB
3 8
WWWBBBBB
WWWBWWWB
BBWWWBWW
5 2
WB
BB
BB
BW
BB
6 4
WWBW
WBWB
WWWW
WWWB
BBWW
BWBW
2 3
WWW
WBW
124 125
BWWWWWWWWWWWWWWWWWWWWWWWWWWBWWWWBWWWWWWWWBWWWWWWWWWWWBBBBWWWWWWWWWWWWWWWWWBWWWWWWWWWBWWWWWWWWWWBWWWWWWWWBBWWWWWWWWWWWWWWWWWWB
WWWWWWWBWWBWWWWWWWWWWWBWWBWWBWWWWBWWWWWWWWWBWBWB...

output:

J
J
J
I
I
J
I
I
I
J
I
J
J
I
J
I
I
I
I
I
I
J
I
I
I
J
J
I
J
J
J
J
I
I
I
J
J
J
J
I
J
J
I
I
I
I
J
I
J
J
J
I
J
I
J
J
J
J
I
I
J
J
J
I
J
I
I
I
I
I
J
I
J
I
J
I
I
I
J
I
J
J
J
J
J
I
J
J
I
I
I
J
J
I
I
J
J
J
J
I

result:

wrong answer 14th lines differ - expected: 'J', found: 'I'