QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#536397 | #5254. Differences | chimera | WA | 252ms | 30292kb | C++11 | 687b | 2024-08-29 10:33:25 | 2024-08-29 10:33:25 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll calc(string& A, string& B) {
ll ans = 0;
for(ll i = 0; i < A.size(); i++) ans += (A[i]!=B[i]);
return ans;
}
int main() {
ll N,M,K; cin >> N >> M >> K;
vector<string> Ss(N);
for(ll i = 0; i < N; i++) cin >> Ss[i];
ll ans;
for(ll i = 0; i < N; i++) {
ll ct = 0;
ll tr = 0;
for(ll j = 0; j < 10; j++) {
ll i2 = (i+1+j)%N;
if(i2 != i) {
tr++;
if(calc(Ss[i],Ss[i2]) == K) ct++;
}
}
if(tr == ct) ans = i+1;
}
cout << ans << endl;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 252ms
memory: 30292kb
input:
3585 4096 2048 ABBBBBBAABAAAAAAAAAAAAABAABABBBABABAAAAABABAAAABAABAABBABBAABAABABBABAABBABBABABABBAAAABBABAABBBBABBBAABBBBBABAABAAABAAABBBBAAAABAABAABABABABBBBBABAAABAAABBAABABBABAABBAABBAABABBBBAABAAAABAABBABAAABBAAAAAABAABBABBABAABABBBAABABBABABBBAAAAABBBABABABBAABAAAABBBBABABAABBBABABABBAABBBABAB...
output:
3585
result:
wrong answer 1st lines differ - expected: '1397', found: '3585'