# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99410 | naoai | Race (IOI11_race) | C++14 | 399 ms | 71572 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 "race.h"
using namespace std;
#define fin cin
#define fout cout
//ifstream fin("x.in"); ofstream fout("x.out");
typedef long long i64;
const int nmax = 2e5;
static i64 K;
static int ans;
bool viz[nmax + 1];
int lant[nmax + 1], sz[nmax + 1];
i64 ct[nmax + 1];
vector<pair<int, int>> g[nmax + 1];
set<pair<i64, int>> s[nmax + 1];
void dfs (int nod, int h, int dad = -1) {
viz[nod] = 1;
sz[nod] = 1;
int mxf = -1, mxg = -1, valm = 0;
for (auto i : g[nod]) {
if (viz[i.first] == 0) {
dfs(i.first, h + 1, nod);
# | 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... |