This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// Bismi Allah
#include "bits/stdc++.h"
using namespace std;
signed main () {
int n, m, k;
cin >> n >> m >> k;
string str[n];
for(int i = 0; i < n; i ++) cin >> str[i];
for(int i = 0; i < n; i ++) {
for(int j = 0; j < n; j ++) {
if(i == j) continue;
int cnt = 0;
for(int idx = 0; idx < m; idx ++) {
cnt += (str[i][idx] != str[j][idx]);
}
if(cnt == k) continue;
goto end;
}
cout << i + 1;
return 0;
end:;
}
assert(false);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |