# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
647485 | Matteo_Verz | Floppy (RMI20_floppy) | C++17 | 134 ms | 19496 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 "floppy.h"
#ifdef BLAT
#include "debug/debug.hpp"
#else
#define debug(x...)
#endif
using namespace std;
void dfs(int node, string &bits, const vector <pair <int, int>> &sons) {
if (sons[node].first == -1) bits += '0';
else
bits += '1';
if (sons[node].second == -1) bits += '0';
else bits += '1';
if (sons[node].first != -1)
dfs(sons[node].first, bits, sons);
if (sons[node].second != -1)
dfs(sons[node].second, bits, sons);
}
void read_array(int subtask_id, const vector <int> &v) {
int n = v.size();
stack <int> st;
vector <pair <int, int>> sons(n, make_pair(-1, -1));
vector <bool> isroot(n, true);
for (int i = 0; i < n; i++) {
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... |