# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
385309 | Pichon5 | 악어의 지하 도시 (IOI11_crocodile) | C++17 | 624 ms | 44864 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "crocodile.h"
#include<bits/stdc++.h>
#define lcm(a,b) (a/__gcd(a,b))*b
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define F first
#define S second
using namespace std;
vector<vector<pair<int,int> > >G;
const int INF=2*1e9;
int dp[1005];
void dfs(int nodo,int p){
vi v;
for(auto it : G[nodo]){
if(it.F==p)continue;
dfs(it.F,nodo);
v.pb(dp[it.F]+it.S);
}
sort(v.begin(),v.end());
if(G[nodo].size()==1){
dp[nodo]=0;
}else{
dp[nodo]=v[1];
}
}
int travel_plan(int N, int M, int R[][2], int L[], int K, int P[])
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |