# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
25811 | tlwpdus | 전압 (JOI14_voltage) | C++98 | 366 ms | 25160 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;
typedef pair<int,int> pii;
int n, m;
vector<int> lis[100100];
vector<int> id[100100];
int color[100100];
int s[100100], e[100100], son[200100];
int rev[200100];
bool visit[100100];
int tt, odd;
int od[200100], ev[200100];
void dfs(int here, int col, int ep) {
int i;
s[here] = tt;
tt++;
color[here] = col;
for (i=0;i<lis[here].size();i++) {
int there = lis[here][i];
if (id[here][i]==ep) continue;
if (color[there]) {
if (s[there]>s[here]) continue;
rev[id[here][i]] = ((color[here]==color[there])?1:2);
if (color[here]==color[there]) odd++;
int *p = ((color[here]==color[there])?od:ev);
p[here]++; p[there]--;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |