제출 #308446

#제출 시각아이디문제언어결과실행 시간메모리
308446juggernautUnscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
1 ms416 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); } fill(s.begin(),s.end(),'0'); compile_set(); while(n-cnt) for(i=0;i<n;i++) if(s[id[i]]=='0'){ s[id[i]]='1'; if(check_element(s)){ ans[id[i]]=cnt++; break; }else s[id[i]]='0'; } 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...