QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#507204 | #5254. Differences | thangthang# | WA | 22ms | 23424kb | C++20 | 658b | 2024-08-06 13:31:52 | 2024-08-06 13:31:53 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, m, k, cnt[N][4];
string s[N];
void solve(){
cin >> n >> m >> k;
for (int i = 1; i <= n; ++ i){
cin >> s[i];
for (int j = 0; j < m; ++ j) cnt[j][s[i][j] - 'A'] ++;
}
for (int i = 1; i <= n; ++ i){
long long dist = 0;
for (int j = 0; j < m; ++ j) dist += (n - cnt[j][s[i][j] - 'A']);
if (dist == 1ll * k * (n - 1)){
cout << i;
return;
}
}
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
solve();
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 22ms
memory: 23424kb
input:
3585 4096 2048 ABBBBBBAABAAAAAAAAAAAAABAABABBBABABAAAAABABAAAABAABAABBABBAABAABABBABAABBABBABABABBAAAABBABAABBBBABBBAABBBBBABAABAAABAAABBBBAAAABAABAABABABABBBBBABAAABAAABBAABABBABAABBAABBAABABBBBAABAAAABAABBABAAABBAAAAAABAABBABBABAABABBBAABABBABABBBAAAAABBBABABABBAABAAAABBBBABABAABBBABABABBAABBBABAB...
output:
2
result:
wrong answer 1st lines differ - expected: '1397', found: '2'