백준 10026 적록색약 [c++]


백준 10026 적록색약 [c++]

#include #include #include #include using namespace std; //R빨 G초 B파 //적록색약은 R G 똑같이 int n; char map[101][101]; bool visited[101][101]; int dx[4] = { 1,0,-1,0 }; int dy[4] = { 0,1,0,-1 }; int answer=0; int answer2=0; void func(int x, int y, char color, bool check)//첫번째 매개변수 부터 x,y좌표, 현재구역의색, 적록색약의 여부 { queueq; q.push({ x,y }); visited[x][y] = true; while (!q.empty()) { int qx = q.front().first; i..


원문링크 : 백준 10026 적록색약 [c++]