Submission #932698

#TimeUsernameProblemLanguageResultExecution timeMemory
932698WongChun1234Genetics (BOI18_genetics)C++14
19 / 100
292 ms15448 KiB
#include<bits/stdc++.h> using namespace std; const int N=4150; int n,m,k,cnt; string s; bitset<1800> bs[N]; int main(){ cin>>n>>m>>k; for (int i=1;i<=n;i++){ cin>>s; for (int j=0;j<m;j++) bs[i][j]=(s[j]=='A'); } for (int i=1;i<=n;i++){ for (int j=1;j<=n;j++){ if (i==j) continue; cnt=(bs[i]^bs[j]).count(); if (cnt!=k) goto skip; } cout<<i<<"\n"; return 0; skip:; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...