2012-08-01から1日間の記事一覧
解法 座標圧縮+DFS はじめて座標圧縮した。 解説を参考にして解いた #include <cstdio> #include <algorithm> #include <set> using namespace std; const int MAX_N = 1000; int N, h, w; bool a[MAX_N * 2 + 3][MAX_N * 2 + 3]; int dx[4] = { 1, -1, 0, 0}; int dy[4] = { 0, 0, 1</set></algorithm></cstdio>…