# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
115105 | oolimry | 경주 (Race) (IOI11_race) | C++14 | 3035 ms | 255824 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "race.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
static vector<ii> adj[200005];
static bool vis[200005];
static unordered_map<int,int> dp[200005];
int k;
int ans = 102345678;
void dfs(int u){
vis[u] = true;
for(int i = 0;i < adj[u].size();i++){
int v = adj[u][i].first;
int w = adj[u][i].second;
if(vis[v]) continue;
dfs(v);
vector<ii> updates;
for(ii x : dp[v]){
int value = w + x.first;
if(value <= k){
if(dp[u].find(k-value) != dp[u].end()){
ans = min(ans, dp[u][k-value] + x.second + 1);
}
updates.push_back({value,x.second+1});
}
}
컴파일 시 표준 에러 (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... |