# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
972065 | ghostlywalrus | Race (IOI11_race) | C++17 | 338 ms | 31824 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>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
using namespace std;
#define ll long long
#define PI pair<int,int>
#define f first
#define s second
#define pb push_back
#define szo(x) ((int)x.size())
#define all(a) (a).begin(), a.end()
#define dbg(v) \
cout << "Line(" << _LINE << ") -> " << #v << " = " << (v) << endl;
int const INF = 0x3f3f3f3f;
ll const LINF = 0x3f3f3f3f3f3f3f3fll;
const int maxn = 2e5+10;
vector<PI> adj[maxn];
int subsize[maxn];
bool isremoved[maxn];
int get_subsize(int x, int prev=-1){
subsize[x] = 1;
for (auto [nex, w] : adj[x]){
if (nex == prev || isremoved[nex]) continue;
subsize[x] += get_subsize(nex, x);
}
# | 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... |