[코드업] 2610 : 그림판 채우기 (C)
알고리즘 Flood Fill 풀이 주어지는 X, Y 좌표가 Zero base이기 때문에 Zero base로 짜는 것이 편하다. '_' (빈칸) 과 '*'(채워진 칸)을 0, 1으로 대응시키면 조건 처리를 할 때 더욱 편리하게 할 수 있다. 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253#includeusing namespace std; int in[10][10];int dir[4][2]={{1,0}, {0,1}, {-1,0}, {0,-1}}; void print(){ for(int i=0;i