백준 6186번1 [BOJ / C++] 6186번 : Best Grass 문제 Bessie is planning her day of munching tender spring grass and is gazing out upon the pasture which Farmer John has so lovingly partitioned into a grid with R (1 r >> c; for(int i = 0; i > MAP[i][j]; } } for(int i = 0; i < r; i++) { for(int j = 0; j < c; j++) { if(MAP[i][j] == '#' && !visited[i][j]) { result++; BFS(make_pair(i, j)); } } } cout 2023. 4. 4. 이전 1 다음