結果

問題 No.2387 Yokan Factory
ユーザー 👑 zeronosu77108zeronosu77108
提出日時 2023-07-21 22:32:37
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 614 bytes
コンパイル時間 5,340 ms
コンパイル使用メモリ 135,348 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 22:31:54
合計ジャッジ時間 11,370 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
4,348 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
4,348 KB
testcase_14 WA -
testcase_15 TLE -
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 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <queue>
#include <atcoder/all>

using namespace std;
using namespace atcoder;

int main() {
    int n,m,x;
    cin >> n >> m >> x;

	mcf_graph<int, long long> pd(n);

    for (int _=0; _<m; _++) {
        long long u,v,a,b; cin >> u >> v >> a >> b;
        u--; v--;
        pd.add_edge(u,v, b,a);
        pd.add_edge(v,u, b,a);
    }

    auto v = pd.slope(0, n-1);
    long long ans = -1;
    bool f = true;
    for (const auto& [a,b]: v) {
      if (f) { f=false; continue; }
        if (b/2 <= x) ans = max(ans, (long long)a);
    }
  
  cout << ans << endl;
  
}
0