# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
175896 | muhammad_hokimiyon | 경주 (Race) (IOI11_race) | C++14 | 591 ms | 35560 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "race.h"
#define fi first
#define se second
#define ll long long
using namespace std;
const int N = 2e5 + 7;
const int NN = 1e6 + 7;
const int mod = 1e9 + 7;
int n,k;
int ans = 1e9;
bool used[N];
int sz[N];
int m[NN];
vector < pair < int , int > > v[N];
void dfs( int x , int p , int d , vector < pair < int , int > > &t , int sum )
{
if( sum > k )return;
t.push_back({sum , d});
for( auto y : v[x] ){
if( y.fi != p && !used[y.fi] ){
dfs(y.fi , x , d + 1 , t , sum + y.se);
}
}
}
# | 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... |