# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
421088 | Jasiekstrz | 도로 폐쇄 (APIO21_roads) | C++17 | 1907 ms | 504452 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "roads.h"
#include<bits/stdc++.h>
#define fi first
#define se second
using namespace std;
const int NN=1e5;
const int SQ=100;
const long long INF=(long long)1e18+7;
vector<pair<int,int>> e[NN+10];
vector<pair<long long,long long>> *dp[NN+10]; // fi - parent destroyed, se - parent not destroyed
bool big(int x)
{
return e[x].size()>SQ;
}
void dfs(int x,int p,int n)
{
for(auto v:e[x])
{
if(v.fi!=p)
dfs(v.fi,x,n);
}
if(big(x))
{
dp[x]=new vector<pair<long long,long long>>(n);
vector<long long> tmp;
tmp.reserve(e[x].size());
// small k
for(int k=0;k<=min(SQ,n-1);k++)
{
tmp.clear();
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |