제출 #932696

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9326962024-02-24 03:30:30WongChun1234Genetics (BOI18_genetics)C++14
27 / 100
2021 ms5816 KiB
#include<bits/stdc++.h>
using namespace std;
const int N=4150;
int n,m,k,curr,test,cnt,perm[N],seed[N];
string ipt,a[N];
set<pair<int,int>> ppl,all;
mt19937 rng(1234);
int random(int l,int r){
return uniform_int_distribution<int>(l,r)(rng);
}
int choose(set<pair<int,int>> &s){
auto it=s.upper_bound({random(1,1e9),0});
if (it==s.end()) it=s.begin();
return (*it).second;
}
int main(){
cin>>n>>m>>k;
iota(perm,perm+m,0);
shuffle(perm,perm+m,rng);
for (int i=1;i<=n;i++){
cin>>ipt;
a[i]=ipt;
for (int j=0;j<m;j++) a[i][j]=ipt[perm[j]];
seed[i]=random(1,1e9);
ppl.insert({seed[i],i});
all.insert({random(1,1e9),i});
}
while (ppl.size()>1){
curr=choose(ppl);
do{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...