#include <bits/stdc++.h>
#define int long long
using namespace std;
bitset<4101*4> t[4101];
int res[4101];
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int a, b, c;
cin >> a >> b >> c;
for (int i = 1; i <= a; i++) {
string s;
cin >> s;
for (int j = 0; j < b; j++) {
if (s[j]=='A'){
t[i][j]=1;
}else if (s[j]=='T'){
t[i][b+j]=1;
}else if (s[j]=='G'){
t[i][2*b+j]=1;
}else{
t[i][3*b+j]=1;
}
}
}
for (int i = 1; i <= a; i++) {
for (int j = i + 1; j <= a; j++) {
if ((t[i] ^ t[j]).count() == 2*c) {
res[i]++;
res[j]++;
}
}
}
for (int i = 1; i <= a; i++) {
if (res[i] == a - 1) {
cout << i << "\n";
return 0;
}
}
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... |