| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1310551 | Johan | Unscrambling a Messy Bug (IOI16_messy) | C++20 | 1 ms | 348 KiB |
#include "messy.h"
#include <bits/stdc++.h>
using namespace std;
void add(string s){
add_element(s);
}
bool is(string s){
return check_element(s);
}
vector < int > restore_permutation(int n, int w, int r){
string s = "";
for(int i = 0; i < n; i++)
s += '0';
for(int i = 0; i < n; i++){
s[i] = '1';
add(s);
}
compile_set();
for(int i = 0; i < n; i++)
s[i] = '0';
int id = 0;
vector < int > p(n);
while(count(s.begin(), s.end(), '1') != n){
for(int i = 0; i < n; i++){
if(s[i] == '1')continue;
s[i] = '1';
if(is(s) == true){
p[i] = id++;
break;
}
s[i] = '0';
}
}
return p;
}
/*
6 1000 1000
2 4 5 0 1 3
*/
Compilation message (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... | ||||
