This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int n, m, k;
string codes[4150];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m >> k;
for (int i = 0; i < n; i++) {
cin >> codes[i];
}
for (int i = 0; i < n; i++) {
int cloneCount = 0;
for (int j = 0; j < n; j++) {
if (i == j) continue;
int diffCount = 0;
for (int k = 0; k < m; k++) if (codes[i][k] != codes[j][k]) diffCount++;
if (diffCount == k) cloneCount++;
}
if (cloneCount == n - 1) return cout << i + 1 << '\n', 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... |