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