2013-09-12から1日間の記事一覧
グリッドグラフだ〜〜〜という気持ちになって頑張る. コードだけ上げておきます O(MN) #include <cstdio> #include <algorithm> #include <cstring> using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (int)n; ++i) const int dx[4] = {1, -1, 0, 0}; co</cstring></algorithm></cstdio>…