# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
526967 | FelipeH | 경주 (Race) (IOI11_race) | C++14 | 1825 ms | 49624 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "race.h"
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 200000 + 10, MAXK = 1000000 + 10, INF = 100000000;
vector<int> g[MAXN], p[MAXN];
int marc[MAXK], lastSave[MAXK], removed[MAXN], sub[MAXN];
int ans = INF, cnt, globalK;
int debug = 0;
int readMarc(int pos){
if(pos < 0 || pos > MAXK) return INF;
if(lastSave[pos] == cnt) return marc[pos];
else return INF;
}
void writeMarc(int pos, int val){
marc[pos] = val; lastSave[pos] = cnt;
}
void calcSub(int v, int f){
sub[v] = 1;
for(int i = 0;i<(int)g[v].size();i++){
int viz = g[v][i];
if(viz == f || removed[viz] == 1) continue;
calcSub(viz, v);
sub[v] += sub[viz];
}
return;
# | 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... |