| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1327857 | QuocSensei | Unscrambling a Messy Bug (IOI16_messy) | C++20 | 1 ms | 332 KiB |
#include <bits/stdc++.h>
#define ll long long
#define el cout << '\n'
using namespace std;
void add_element(string x);
void compile_set();
bool check_element(string x);
namespace SUBTASK_12
{
vector<int> solve(int n, int w, int r)
{
vector<int> ans(n, 0);
string s = "";
for (int _ = 1; _ <= n; _++)
s += '0';
for (int i = 0; i < n; i++)
{
s[i] = '1';
add_element(s);
}
compile_set();
s = "";
for (int _ = 1; _ <= n; _++)
s += '0';
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (s[j] == '1')
continue;
s[j] = '1';
if (check_element(s))
{
ans[j] = i;
break;
}
s[j] = '0';
}
}
return ans;
}
bool check_sub(int n, int w, int r)
{
return w >= n && r >= n * n;
}
};
vector<int> restore_permutation(int N, int W, int R)
{
if (SUBTASK_12::check_sub(N, W, R))
return SUBTASK_12::solve(N, W, R);
return {};
}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... | ||||
