#include <bits/stdc++.h>
#define int int64_t
using namespace std;
//a, c, g, t
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
//freopen("input.in", "r", stdin);
//freopen("output.out", "w", stdout);
int n, m, k; cin>>n>>m>>k;
vector<array<int, 4>>v(n, array<int, 4>());
vector<string>input(n);
vector<int>mp(100);
mp[(int)'A'] = 0;
mp[(int)'C'] = 1;
mp[(int)'G'] = 2;
mp[(int)'T'] = 3;
for(int i = 0; i<n; ++i){
string s; cin>>s;
input[i] = s;
for(int j = 0; j<m; ++j){
++v[j][mp[(int)s[j]]];
}
}
int ans = 0;
for(int i = 0; i<n; ++i){
int cur = 0;
for(int j = 0; j<m; ++j){
for(int kk = 0; kk<4; ++kk){
if(kk == mp[(int)input[i][j]]) continue;
cur += v[j][kk];
}
}
if(cur == (n-1)*k) ans = i+1;
}
cout<<ans;
cout<<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
30 ms |
6000 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
30 ms |
6000 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |