색종이 붙이기
/* 1. undo를 해주면 level 설정 필요 x */ #include #include #include using namespace std; bool map[10][10]; int dp[10][10]; bool row_of_ones[5] = { 1, 1, 1, 1, 1 }; bool row_of_zeros[5]; int one_ctr; unsigned ans = -1; int coverage[6] = { 0, 1, 4, 9, 16, 25 }; int paper_ctr[6]; int paper_ctr_max[] = { -1, 5, 5, 5, 4, 4 }; bool vst[10][10];/* 1 */ bool possible[6][10][10]; void bf(int rb, int cb, int tot_..