| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 113057 | oolimry | Crocodile's Underground City (IOI11_crocodile) | C++14 | 1239 ms | 91304 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int travel_plan(int N, int M, int R[][2], int L[], int K, int P[])
{
    int n = N;
    int m = M;
    typedef pair<long long, long long> ii;
    const long long inf = 10234567890123456ll;
    ii value[n];
    fill(value, value + n, ii(inf,inf));
    for(int i = 0;i < K;i++){
        value[P[i]] = ii(0,0);
    }
    multiset<ii> s;
    for(int i = 0;i < N;i++){
        s.insert(ii(value[i].second, i));
    }
    vector<ii> adj[n];
    for(int i = 0;i < m;i++){
        int a = R[i][0];
        int b = R[i][1];
        adj[a].push_back(ii(b,L[i]));
        adj[b].push_back(ii(a,L[i]));
    }
    while(!s.empty()){
        int u = s.begin()->second;
        s.erase(s.begin());
        long long x = value[u].second;
        for(int i = 0;i < adj[u].size();i++){
            int v = adj[u][i].first;
            long long y = adj[u][i].second;
            if(x + y < value[v].second){
                //cout << u << " " << v << "\n";
                s.erase(s.find(ii(value[v].second, v)));
                if(x + y < value[v].first){
                    value[v].second = value[v].first;
                    value[v].first = x + y;
                }
                else{
                    value[v].second = x + y;
                }
                s.insert(ii(value[v].second, v));
            }
        }
    }
    return value[0].second;
}
컴파일 시 표준 에러 (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... | ||||
