Submission #753266

#TimeUsernameProblemLanguageResultExecution timeMemory
753266boyliguanhanGenetics (BOI18_genetics)C++17
100 / 100
1184 ms137832 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...