結果

問題 No.3668 Minimum Cut
コンテスト
ユーザー
提出日時 2026-09-04 22:55:40
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.92.0)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 905 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,908 ms
コンパイル使用メモリ 364,504 KB
実行使用メモリ 9,788 KB
最終ジャッジ日時 2026-09-04 23:04:07
合計ジャッジ時間 7,149 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 TLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <atcoder/maxflow>
using namespace std;
using namespace atcoder;
using ll = long long;
using vll = vector<ll>;
template <typename K, typename V>
using umap = unordered_map<K, V>;

#define rep(i, n) for (int i = 0; i < n;i++)
#define rep1(i, n) for (int i = 1; i <= n;i++)
#define rrep(i, n) for (int i = n - 1; i >= 0;i--)
#define rrep1(i, n) for (int i = n; i >= 1;i--)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1LL << 60
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, m, s, t;
    cin >> n >> m >> s >> t;
    mf_graph<ll> graph(n);
    rep(i, m) {
        int u, v;
        cin >> u >> v;
        u--;v--;
        ll c;
        cin >> c;
        graph.add_edge(u, v, c);
    }
    cout << graph.flow(--s, --t) << endl;
}
0