| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1246689 | Saul0906 | Unscrambling a Messy Bug (IOI16_messy) | C++20 | 0 ms | 328 KiB |
#include "messy.h"
#include <bits/stdc++.h>
#include <cstdlib>
#define pii pair<int, int>
#define rep(a,b,c) for(int a=b; a<c; a++)
#define repr(a,b,c) for(int a=b-1; a>c-1; a--)
#define repa(a,b) for(auto a:b)
#define fi first
#define se second
#define all(a) a.begin(), a.end()
using namespace std;
mt19937 rnd(1e9+7);
vector<int> restore_permutation(int n, int w, int r) {
vector<int> p(n), rp(n);
rep(i,0,n) rp[i]=i;
shuffle(all(rp),rnd);
string s;
s.resize(n);
rep(i,0,n) s[i]='0';
rep(i,0,n-1){
s[i]='1';
add_element(s);
}
compile_set();
bool vis[n]{};
rep(i,0,n) s[i]='1';
repr(i,n,0){
repa(e,rp){
if(vis[e]) continue;
s[e]='0';
if(check_element(s)){
p[e]=i;
vis[e]=true;
break;
}
s[e]='1';
}
}
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... | ||||
