# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
649676 | milisav | 경주 (Race) (IOI11_race) | C++14 | 388 ms | 87536 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "race.h"
#define maxn 200005
//#define MAX_N 500000
using namespace std;
int n,k;
vector<pair<int,int> > a[maxn]; //u a[u] su grane susedne sa u
set<pair<int,int> > s[maxn];
int o1[maxn];
int o2[maxn];
int pok[maxn];
int sol;
void dfs(int u,int pr) {
pok[u] = u;
s[u].insert({0,0});
o1[u] = 0;
o2[u] = 0;
int ch = 0;
for(auto edge:a[u]) {
int v=edge.first;
int w=edge.second;
if(v!=pr) {
ch++;
dfs(v,u);
if(s[pok[u]].size()<=s[pok[v]].size()) pok[u]=pok[v];
}
}
if(ch==0) {
컴파일 시 표준 에러 (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... |