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>
using namespace std;
int main()
{
int n, m, k;
cin >> n >> m >> k;
vector<vector<int>> miss(m, vector<int>(4, 0));
auto trans = [](char c){
string str = "ACTG";
for(int j =0; j < 4; j++)
{
if(str[j] == c)
return j;
}
assert(false);
};
vector<string> lin(n);
for(int i =0; i < n; i++)
{
cin >> lin[i];
}
for(int i = 0; i < m; i++)
{
for(int j= 0; j < n; j++)
{
miss[i][trans(lin[j][i])] ++;
}
}
for(int i =0; i < n; i ++)
{
int ans = 0;
for(int j= 0; j < m; j++)
{
for(int ii =0; ii < 4; ii ++)
{
if("ACTG"[ii] != lin[i][j])
ans += miss[j][ii];
}
}
if(ans == n * k - k)
{
cout<< i +1;
return 0;
}
}
assert(false);
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... |