Submission #473490

#TimeUsernameProblemLanguageResultExecution timeMemory
473490elgamalsalmanGenetics (BOI18_genetics)C++14
27 / 100
2027 ms3612 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...