QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#425337#8742. 黑白ucup-team2279#WA 34ms3668kbC++17379b2024-05-30 08:54:442024-05-30 08:54:44

Judging History

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

  • [2024-05-30 08:54:44]
  • 评测
  • 测评结果:WA
  • 用时:34ms
  • 内存:3668kb
  • [2024-05-30 08:54:44]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int main() {
	cin.tie(0)->sync_with_stdio(0);
	int t;
	cin >> t;
	while (t--) {
		int n, m;
		cin >> n >> m;
		int cnt = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				char c;
				cin >> c;
				cnt += c == 'W';
			}
		}
		cout << (cnt - n - m - 1 & 1 ? 'I' : 'J') << "\n";
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 34ms
memory: 3668kb

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'