# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
429472 | hibye1217 | Race (IOI11_race) | C++17 | 676 ms | 38040 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.
#ifndef NOTSUBMIT
#include "race.h"
#include <bits/stdc++.h>
using namespace std;
#endif // NOTSUBMIT
typedef long long ll;
typedef pair<ll, ll> pl2;
typedef pair<int, int> pi2;
#define fr first
#define sc second
vector<pl2> adj[200020];
bool chk[200020];
int sz[200020];
int siz(int now, int par){
//cout << " SIZ " << now << ' ' << par << endl;
sz[now] = 1;
for (pl2 p : adj[now]){
//cout << " P " << p.fr << ' ' << p.sc << endl;
int nxt = p.fr;
if (nxt == par || chk[nxt]){ continue; }
//cout << " ?? " << nxt << ' ' << now << endl;
sz[now] += siz(nxt, now);
}
//cout << " SIZE " << now << ' ' << sz[now] << endl;
return sz[now];
}
# | 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... |