# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
133187 | muradeyn | Valley (BOI19_valley) | C++14 | 571 ms | 47384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/* Murad Eynizade */
#include <bits/stdc++.h>
#define intt long long
#define fyck ios_base::sync_with_stdio(0);cin.tie(0);
#define F first
#define S second
//#define endl '\n'
using namespace std;
const int maxx = 100001 , lg = 17;
int n , m , q , ex , nxt;
int lvl[maxx] , in[maxx] , dp[maxx] , shop[maxx] , cnt[maxx];
intt dist[maxx] , table[maxx][lg] , close[maxx] , par[maxx][lg];
vector< pair<int,intt> >v[maxx] , arr;
void dfs(int s,int p) {
dp[s] = 1;
cnt[s] = shop[s];
par[s][0] = p;
in[s] = ++nxt;
lvl[s] = lvl[p] + 1;
for (auto to : v[s])
if (to.F != p) dist[to.F] = dist[s] + to.S , dfs(to.F , s) , dp[s] += dp[to.F] , cnt[s] += cnt[to.F];
}
# | 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... |