QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#102442 | #5254. Differences | fz_zsl# | WA | 30ms | 23376kb | C++17 | 791b | 2023-05-03 13:15:25 | 2023-05-03 13:15:26 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5;
string str[MAX_N];
int N, M, K;
int buc[MAX_N][4];
using LL = long long;
bool check(int p) {
for (int i = 1; i <= N; i++) {
if (i == p) continue;
int cnt = 0;
for (int j = 0; j < M && cnt <= K; j++)
cnt += str[p][j] != str[i][j];
if (cnt != K) return 0;
}
return 1;
}
int main() {
ios::sync_with_stdio(false);
cin >> N >> M >> K;
for (int i = 1; i <= N; i++) cin >> str[i];
for (int i = 1; i <= N; i++)
for (int j = 0; j < M; j++)
buc[j][str[i][j] - 'A']++;
for (int i = 1; i <= N; i++) {
LL sum = 0;
for (int j = 0; j < M; j++)
sum += N - buc[j][str[i][j] - 'A'];
if (sum == 1ll * (N - 1) * K) {
cout << i << endl;
return 0;
}
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 30ms
memory: 23376kb
input:
3585 4096 2048 ABBBBBBAABAAAAAAAAAAAAABAABABBBABABAAAAABABAAAABAABAABBABBAABAABABBABAABBABBABABABBAAAABBABAABBBBABBBAABBBBBABAABAAABAAABBBBAAAABAABAABABABABBBBBABAAABAAABBAABABBABAABBAABBAABABBBBAABAAAABAABBABAAABBAAAAAABAABBABBABAABABBBAABABBABABBBAAAAABBBABABABBAABAAAABBBBABABAABBBABABABBAABBBABAB...
output:
2
result:
wrong answer 1st lines differ - expected: '1397', found: '2'