2010-09-03から1日間の記事一覧

AOJ 0212 Highway Express Bus

404 Not Found 解けるようになっててビビった。先輩ん家で解説された時何となく言ってることは分かるけど、実装方法とかチンプンカンプンだったのに。 「ネタ(アルゴリズム)」を持っていると強いです。 クソ最適化されてない害クストラ #include <iostream> #include <queue> </queue></iostream>…

AOJ 0180 Stellar Performance of the Debunkey Family

404 Not Found Prim法(全域最小木)そのまま。前知ったアルゴリズム。 非常に単純で、『プリム法(最小全域木問題)』を読めば単純明快です。 ノード情報は隣接行列で実装。 #include <iostream> #include <list> #include <algorithm> #include <climits> using namespace std; #define rep(i,n) </climits></algorithm></list></iostream>…