| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1312613 | settop | Unscrambling a Messy Bug (IOI16_messy) | C++20 | 1 ms | 348 KiB |
#include "messy.h"
#include<bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ll long long
#define ordered_set tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
#define fall(i,a,b) for(int i=a;i<=b;i++)
#define rfall(i,a,b) for(int i=a;i>=b;i--)
#define pb push_back
#define sz(x) (int)x.size()
typedef pair<ll,ll> pii;
std::vector<int> restore_permutation(int n, int w, int r) {
string s="";
fall(i,0,n-1) s+="0";
fall(i,0,n-1){
s[i]='1';
add_element(s);
}
compile_set();
bool open=0;
fall(i,0,n-1) s[i]='0';
int a=0,b=0;
vector<int> p;
fall(i,0,n-1) p.pb(i);
fall(i,0,n-1){
s[i]='1';
bool z=check_element(s);
if(z==0 && !open){
a=i;
open=1;
}
else if(z==1 && open){
b=i;
open=0;
}
}
swap(p[a],p[b]);
return p;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
