제출 #599155

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5991552022-07-19 10:58:34PyishtellUnscrambling a Messy Bug (IOI16_messy)C++17
100 / 100
3 ms592 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#include "messy.h"
int n;
vector<int> v;
void dfs(vector<int> x, vector<int> y){
if(x.size()==2){
bool b = check_element(string(n-1,'1').insert(y[1],"0"));
if(b) v[x[0]] = y[0], v[x[1]] = y[1];
else v[x[0]] = y[1], v[x[1]] = y[0];
}
else{
int gap = x.size();
vector<int> x1, x2, y1, y2;
for(int i=0; i<gap; i++){
string s = string(n-gap,'1');
for(int j=0; j<gap; j++){
if(j==i) s.insert(y[j],"1");
else s.insert(y[j],"0");
}
bool b = check_element(s);
if(b) y1.push_back(y[i]);
else y2.push_back(y[i]);
}
for(int i=0; i<gap; i++){
if(i<gap/2) x1.push_back(x[i]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...