# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
769412 | _Avocado_ | Genetics (BOI18_genetics) | C++14 | 0 ms | 0 KiB |
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>
#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';
}