2012-03-21から1日間の記事一覧
問題 解法 ダイクストラ法で解いた。 うろ覚えで書いて正直通ると思っていなかったのに、通ってうれしい。 #include <cstdio> #include <queue> #include <vector> #include <algorithm> using namespace std; typedef pair<int ,int> P; //first 距離 second 位置 const int MAX_N = 100, INF = 1 << 30;</int></algorithm></vector></queue></cstdio>…