結果

問題 No.1812 Uribo Road
ユーザー trineutrontrineutron
提出日時 2022-01-14 22:47:40
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,510 bytes
コンパイル時間 2,557 ms
コンパイル使用メモリ 247,376 KB
実行使用メモリ 813,692 KB
最終ジャッジ日時 2024-04-30 16:28:19
合計ジャッジ時間 4,540 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 MLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using edge = pair<int, int>;

int main()
{
    int n, m, k;
    cin >> n >> m >> k;
    vector<bool> must(m);
    for (int i = 0; i < k; i++)
    {
        int r;
        cin >> r;
        r--;
        must.at(r) = true;
    }
    const int s = 1 << k;
    vector<int64_t> to[n * s];
    return 0; /*
    int idx = 0;
    for (int i = 0; i < m; i++)
    {
        int a, b, c;
        cin >> a >> b >> c;
        a--;
        b--;
        for (int j = 0; j < s; j++)
        {
            if (must.at(i))
            {
                to[a * s + j].emplace_back(b * s + (j | (1 << idx)), c);
                to[b * s + j].emplace_back(a * s + (j | (1 << idx)), c);
            }
            else
            {
                to[a * s + j].emplace_back(b * s + j, c);
                to[b * s + j].emplace_back(a * s + j, c);
            }
        }
        if (must.at(i))
        {
            idx++;
        }
    }
    vector<int> dist(n * s, 2e9);
    priority_queue<edge, vector<edge>, greater<edge>> q;
    q.emplace(0, 0);
    while (not q.empty())
    {
        auto [d0, v] = q.top();
        q.pop();
        if (d0 >= dist.at(v))
        {
            continue;
        }
        dist.at(v) = d0;
        for (auto &&[c, d_edge] : to[v])
        {
            if (d0 + d_edge >= dist.at(c))
            {
                continue;
            }
            q.emplace(d0 + d_edge, c);
        }
    }
    cout << dist.back() << endl;
    return 0;*/
}
0