# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
288133 | Alexa2001 | Telegraph (JOI16_telegraph) | C++17 | 70 ms | 12536 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>
using namespace std;
const int Nmax = 1e5 + 5;
typedef long long ll;
int to[Nmax], cost[Nmax], mx1[Nmax], mx2[Nmax];
vector<int> v[Nmax];
ll ans = 0;
int used[Nmax];
int in_solve, in_cycle;
int n;
void upd(int &mx1, int &mx2, int cost)
{
if(cost >= mx1) mx2 = mx1, mx1 = cost;
else if(cost > mx2) mx2 = cost;
}
void mark(int node)
{
used[node] = 2;
for(auto it : v[node])
if(used[it] != 2)
mark(it);
# | 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... |