# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
479926 | sam571128 | Fireworks (APIO16_fireworks) | C++17 | 355 ms | 75000 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <bits/extc++.h>
#define int long long
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int N = 6e5+5;
vector<pair<int,int>> adj[N];
int dp[N], to[N], deg[N], ans = 0;
__gnu_pbds::priority_queue<int> pq[N];
void dfs(int u, int p){
for(auto [v,w] : adj[u]){
if(v == p) continue;
dfs(v,u);
pq[u].join(pq[v]);
}
if(u==1) return;
int l = 0, r = 0;
if(deg[u]){
while(--deg[u]){
pq[u].pop();
}
# | 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... |