[백준]1987번 문제
dfs방식으로 풀면 된다. #include int R, C;int min = 1;bool alpa[100];char arr[21][21]; void dfs(int d, int r, int c){if (min 25){ //알파벳개수return;}alpa[arr[r][c]] = true;printf("%d\n",arr[r][c]); if (alpa[arr[r - 1][c]] ==false)dfs(d + 1, r - 1, c); if (alpa[arr[r + 1][c]]==false)dfs(d + 1, r + 1, c); if (alpa[arr[r][c - 1]] ==false)dfs(d + 1, r, c - 1);if (alpa[arr[r][c + 1]]==false..