# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
799212 | MadokaMagicaFan | Prisoner Challenge (IOI22_prison) | C++17 | 13 ms | 1004 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
#include "prison.h"
using namespace std;
using ll = long long;
#define sz(v) ((int)v.size())
#define pb push_back
vector<array<int, 6>> nd;
int dfs(int x) {
int s = nd[x][1] - nd[x][0] + 1;
nd[x][5] = 0;
if (s <= 2) return 0;
s -= 2;
int e = s / 3;
int e1, e2, e3;
if (!e) {
nd[x][2] = sz(nd);
nd.pb({nd[x][0]+1, nd[x][1] - 1, 0, 0, 0});
nd[x][5] = 1;
return 1;
}
if (s < 5) {
nd[x][2] = sz(nd);
nd[x][3] = sz(nd)+1;
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... |