[문제 링크] : https://www.acmicpc.net/problem/1030#include #include #include using namespace std;int S, N, K, Y1, X1, Y2, X2;bool Arr[51][51];void solve(int s, int y, int x){ if(s == 1){ return; } if(y > Y2 || y + s -1 X2 || x + s - 1 = start && i = start && j > S >> N >> K >> Y1 >> Y2 >> X1 >> X2; solve((int)pow(N, S), 0, 0); for(int i=0; i