제출 #308448

#제출 시각아이디문제언어결과실행 시간메모리
308448juggernautUnscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
1 ms384 KiB
#include"messy.h" #include<bits/stdc++.h> //#include"grader.cpp" using namespace std; int id[1<<7],i,cnt; vector<int>restore_permutation(int n,int w,int r){ iota(id,id+n,0); vector<int>ans(n); string s(n,'0'); for(i=0;i<n;i++){ s[id[i]]++; add_element(s); } shuffle(id,id+n,default_random_engine(chrono::system_clock::now().time_since_epoch().count())); fill(s.begin(),s.end(),'0'); compile_set(); while(n-cnt) for(i=0;i<n;i++) if(!(s[id[i]]&1)){ s[id[i]]++; if(check_element(s)){ ans[id[i]]=cnt++; break; }else s[id[i]]--; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...