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 long long
using namespace std;
int n, m, k, tot, sum[4101][4], dna[4101][4101], w[4101];
signed main() {
cin >> n >> m >> k;
mt19937 rng(12874);
for(int i = 1; i <= n; i++) {
char c; tot+=w[i]=rng();
for(int j = 0; j < m; j++) {
cin >> c;
if(c=='C')dna[i][j]=1;
if(c=='G')dna[i][j]=2;
if(c=='T')dna[i][j]=3;
sum[j][dna[i][j]]+=w[i];
}
}
for(int i = 1; i <= n; i++) {
int x = 0;
for(int j = 0; j < m; j++) {
x+=tot-sum[j][dna[i][j]];
}
if(x==k*(tot-w[i]))
cout << i << '\n';
}
}
# | 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... |