제출 #1076367

#제출 시각아이디문제언어결과실행 시간메모리
1076367asdasdqwerUnscrambling a Messy Bug (IOI16_messy)C++14
49 / 100
1 ms436 KiB
#include <bits/stdc++.h> using namespace std; #include "messy.h" std::vector<int> restore_permutation(int n, int w, int r) { mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); vector<int> pos(n); for (int i=0;i<n;i++) { pos[i]=i; } string ss = string(n, '0'); for (int i=0;i<n;i++) { ss[i]='1'; add_element(ss); } compile_set(); ss = string(n, '0'); vector<int> p(n); shuffle(pos.begin(), pos.end(), rng); for (int i=0;i<n;i++) { for (int j:pos) { if (ss[j] == '1') continue; ss[j] = '1'; if (check_element(ss)) { p[j] = i; break; } ss[j] = '0'; } } return p; }
#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...