QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#753521#9548. The Foolucup-team5319#WA 0ms4088kbC++141.1kb2024-11-16 13:08:112024-11-16 13:08:12

Judging History

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

  • [2024-11-16 13:08:12]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:4088kb
  • [2024-11-16 13:08:11]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
char str[205][MAXN]; bool mp[205][205];
int main() {
	int n, m, l; scanf("%d %d %d", &n, &m, &l);
	for (int i = 1; i <= n; i++) scanf("%s", str[i] + 1);
	for (int i = 1; i <= n; i++) {
		for (int j = 2; j <= m; j++) {
			mp[i][j] = 1;
			for (int k = 1; k <= l; k++) mp[i][j] &= str[i][(j - 2) * l + k] == str[i][(j - 1) * l + k];
		}
		if (i > 1) {
			mp[i][1] = 1;
			for (int k = 1; k <= l; k++) mp[i][0] &= str[i][k] == str[i - 1][(m - 1) * l + k];
		}
	}
	vector<bool> v;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			if (i == 1 && j == 1) continue;
			v.push_back(mp[i][j]);
		}
	}
	int wr = 0; while (v[wr]) wr++;
	// printf("wr = %d\n", wr);
	if (wr == 0) {
		if (v[1] == 0) puts("1 2");
		else puts("1 1");
	}
	else printf("%d %d\n", (wr + 1) / m + 1, (wr + 1) % m + 1);
}
/*
3 5 3
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQwQ

3 5 3
QWQQwQQWQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
3 5 3
QwQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
3 5 3
QWQQWQQwQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 4088kb

input:

3 5 3
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQwQ

output:

3 5

result:

ok single line: '3 5'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3792kb

input:

2 2 1
LL
}L

output:

2 2

result:

wrong answer 1st lines differ - expected: '2 1', found: '2 2'