연구소 (1) 썸네일형 리스트형 [백준] 14502번 연구소 백준 14502번 연구소 C++ 풀이 https://www.acmicpc.net/problem/14502 #include #include #include using namespace std; int map[8][8]; int temp[8][8]; int dx[] = { -1,1,0,0 }; int dy[] = { 0,0,1,-1 }; int N, M; int ans = 0; void copyMap(int a[8][8], int b[8][8]) { for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { a[i][j] = b[i][j]; } } } void bfs() { int spread[8][8]; copyMap(spread, temp); queue q.. 이전 1 다음