Submit Search
Upload
Problem F
•
Download as PPTX, PDF
•
0 likes
•
318 views
Yohei Ito
Follow
Aizu Camp 2013 Day1
Read less
Read more
Report
Share
Report
Share
1 of 7
Download now
Recommended
CODE FESTIVAL 2015 予選B 解説
CODE FESTIVAL 2015 予選B 解説
AtCoder Inc.
AtCoder Beginner Contest 035 解説
AtCoder Beginner Contest 035 解説
AtCoder Inc.
Disco Presents ディスカバリーチャンネルプログラミングコンテスト2016 本選 解説
Disco Presents ディスカバリーチャンネルプログラミングコンテスト2016 本選 解説
AtCoder Inc.
Division
Division
oupc
AtCoder Beginner Contest 034 解説
AtCoder Beginner Contest 034 解説
AtCoder Inc.
One
One
oupc
ACPC 2019 Day3 G: Restricted DFS
ACPC 2019 Day3 G: Restricted DFS
HCPC: 北海道大学競技プログラミングサークル
Cf219 d1e
Cf219 d1e
DEGwer
Recommended
CODE FESTIVAL 2015 予選B 解説
CODE FESTIVAL 2015 予選B 解説
AtCoder Inc.
AtCoder Beginner Contest 035 解説
AtCoder Beginner Contest 035 解説
AtCoder Inc.
Disco Presents ディスカバリーチャンネルプログラミングコンテスト2016 本選 解説
Disco Presents ディスカバリーチャンネルプログラミングコンテスト2016 本選 解説
AtCoder Inc.
Division
Division
oupc
AtCoder Beginner Contest 034 解説
AtCoder Beginner Contest 034 解説
AtCoder Inc.
One
One
oupc
ACPC 2019 Day3 G: Restricted DFS
ACPC 2019 Day3 G: Restricted DFS
HCPC: 北海道大学競技プログラミングサークル
Cf219 d1e
Cf219 d1e
DEGwer
Problem G
Problem G
Yohei Ito
Problem E
Problem E
Yohei Ito
Problem D
Problem D
Yohei Ito
Problem C
Problem C
Yohei Ito
Problem B
Problem B
Yohei Ito
Problem A
Problem A
Yohei Ito
More Related Content
More from Yohei Ito
Problem G
Problem G
Yohei Ito
Problem E
Problem E
Yohei Ito
Problem D
Problem D
Yohei Ito
Problem C
Problem C
Yohei Ito
Problem B
Problem B
Yohei Ito
Problem A
Problem A
Yohei Ito
More from Yohei Ito
(6)
Problem G
Problem G
Problem E
Problem E
Problem D
Problem D
Problem C
Problem C
Problem B
Problem B
Problem A
Problem A
Problem F
1.
Problem F Bicycle 自転車 Aizu Camp
2013 Day1 9/3 @Respect2D
2.
問題概要 N個のノードがある 時系列順に1本ずつエッジが追加される
エッジeiが追加された時点で、以下の条件 を満たす閉路が存在するか出力せよ ◦ ノード1からスタートしてノード1に戻る ◦ 同じノード・同じエッジは2回以上通らない ◦ エッジeiは必ず通る
3.
求めたいことは何か エッジ(a, b)が追加されたとき 交わりのない次の2つのパスがあるか ◦
ノード1からaへのパス ◦ ノード1からbへのパス 右上の図 ◦ 交わりなく2, 4へ着ける(青のパス) ◦ Yesを出力 右下の図 ◦ どうがんばっても(1, 2)エッジで交わる ◦ Noを出力 12 34 追加 エッジ 1 2 34 追加 エッジ
4.
ノード1ノード2 ノード3ノード4 想定解法 エッジが追加されるたびに最大流 グラフは下図のように変形すると良い ◦
エッジの容量は全て1 ◦ ノードを2つに増やすことでノードを1回しか通らな いようにできる 12 34 追加 エッジ inoutinout inoutinout sink
5.
想定解法 ノード1のoutから目一杯流す sinkに2流れるか確認
流れれば、交わりのない2つのパスが存在する ノード1ノード2 ノード3ノード4 inoutinout inoutinout sink
6.
最大流について 蟻本の2種類のアルゴリズムどちらでも通る ◦ タイムリミットは3秒ある ◦
蟻本P.190 : O(F |E|) ... Ford-Fulkerson ◦ 蟻本P.194 : O(|E| |V|^2) ... Dinic 計算量より高速に 動作 グラフを作るテクニック ◦ 各ノードを1回しか通ってはいけない場合 今回のように、1ノードにつき2つのノードを用意 ◦ その他のテクニック 蟻本P.192 – COLUMN さまざまなグラフに対する最大流 是非マスタしておきましょう
7.
結果 First AC ◦
yukeZukky Accept / Submit ◦ 5 / 14 (35.71 %)
Download now