# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1224557 | LIA | Unscrambling a Messy Bug (IOI16_messy) | C++17 | 0 ms | 328 KiB |
#include <vector>
#include "messy.h"
#include <bits/stdc++.h>
using namespace std;
typedef int ll;
typedef tuple <ll,ll,ll> plll;
typedef vector <plll> vplll;
typedef pair <ll,ll> pll;
typedef vector <ll> vll;
typedef vector <pll> vpll;
typedef vector <vector <pll>> vvpll;
typedef vector <vector <ll>> vvll;
typedef vector <bool> vb;
typedef vector <vector <bool>> vvb;
#define loop(i, s, e) for (ll i = (s); i < (e); ++i)
#define loopr(i, e, s) for (ll i = (e)-1; i >= (s); --i)
#define all(a) a.begin(), a.end()
const ll inf = 1e9 + 7;
bool ch(string s) {
if (check_element(s) == 1) return 1;
return false;
}
std::vector<int> restore_permutation(int n, int w, int r) {
string s = "01234567";
add_element(s);
compile_set();
{
if (ch(s)) {
vll ans(n);
loop(i,0,n) {
ans[i] = s[i]-'0';
}
return ans;
}
}
while (next_permutation(all(s))) {
if (ch(s)) {
vll ans(n);
loop(i,0,n) {
ans[i] = s[i]-'0';
}
return ans;
}
}
}
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... |