| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 713447 | That_Salamander | Crocodile's Underground City (IOI11_crocodile) | C++14 | 725 ms | 101536 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#define FOR(var,bound) for(int var = 0; var < bound; var++)
#define FORB(var,lb,up) for (int var = lb; var < ub; var++)
#define FORR(var,bound) for(int var = bound-1; var >= 0; var--)
#define int long long
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;
vector<vector<pii>> conn;
vi a, b;
vector<bool> v;
signed travel_plan(signed n, signed m, signed R[][2], signed L[], signed k, signed P[]) {
    conn.resize(n);
    a.resize(n, 1000000000000ll);
    b.resize(n, 1000000000000ll);
    v.resize(n);
    for (int i = 0; i < m; i++) {
        int t, f, w;
        t = R[i][0];
        f = R[i][1];
        w = L[i];
        conn[t].push_back({f, w});
        conn[f].push_back({t, w});
    }
    priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> q;
    for (int i = 0; i < k; i++) {
        int x;
        x = P[i];
        q.push({0, x});
    }
    while (!q.empty()) {
        auto p = q.top(); q.pop();
        int cost = p.first;
        int room = p.second;
        if (room == 0) {
            return cost;
        }
        if (v[room]) continue;
        v[room] = true;
        for (auto c: conn[room]) {
            int to = c.first;
            int time = cost + c.second;
            if (a[to] > time) {
                b[to] = a[to];
                a[to] = time;
            } else if (b[to] > time) {
                b[to] = time;
            }
            q.push({b[to], to});
        }
    }
}
컴파일 시 표준 에러 (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... | ||||
