| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1355506 | thanhbinh13 | Genetics (BOI18_genetics) | C++20 | 2080 ms | 6524 KiB |
#include <bits/stdc++.h>
using namespace std;
long long n,m,k;
char a[4102][4105];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin>> n >> m >> k;
for (int i = 1; i <= n; i++) {
for (int j = 1 ;j <= m; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= n; i++) {
bool check = true;
for (int j = 1; j <= n; j++) {
if (i == j) continue;
long long cnt = 0;
for (int x = 1; x <= m; x++) {
if (a[i][x] == a[j][x]) cnt++;
}
if (cnt == m-k){
continue;
}
check = false;
}
if (check) {
cout << i;
return 0;
}
}
cout << -1;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
