# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
112237 | thebes | Designated Cities (JOI19_designated_cities) | C++14 | 705 ms | 41764 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MN = 2e5+5;
ll N, Q, i, ans[MN], tot, cur, x, y, a, b, dist[MN], w[2*MN], par[MN];
vector<pair<ll,ll>> adj[MN], ord;
struct pq{bool operator()(const pair<ll,ll>&i,const pair<ll,ll>&j){return i.second>j.second;}};
priority_queue<pair<ll,ll>,vector<pair<ll,ll>>,pq> q;
ll meh(ll n,ll p){
ll cur = 0;
for(auto v : adj[n]){
if(v.first==p) continue;
cur+=w[v.second^1]+meh(v.first,n);
}
return cur;
}
void dfs(ll n,ll p){
ans[1]=max(ans[1],cur);
for(auto v : adj[n]){
if(v.first==p) continue;
cur += w[v.second]-w[v.second^1]; dfs(v.first,n);
cur -= w[v.second]-w[v.second^1];
}
}
pair<ll,ll> dfs2(ll n,ll p){
pair<ll,ll> tmp(n,0);
for(auto v : adj[n]){
if(v.first==p) continue;
auto tt = dfs2(v.first, n);
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |