이 문제는 기본적인 DFS를 활용한 땅 갯수 구하기와 비슷한 문제이다. 문제에서 정상인이 보이는 색과 적록색약이 보이는 색이 다르다. 따라서 각각 정상인 경우와 적록색약인 경우로 나누어 각각 DFS를 돌리면 된다. #include #include #include #include using namespace std; char rgb[102][102]; char rb[102][102]; bool visited[102][102]; int dx[4] = { 0,1,0,-1 }; int dy[4] = { 1,0,-1,0 }; int n; int rgbCnt = 0, rbCnt = 0; void dfs(int x, int y, char arr[][102],char c) { if(visited[x][y]) { ret..