[백준] 16236번 아기상어 C/C++
//백준 아기상어 16236번 //www.acmicpc.net/problem/16236 #include #include #include #include using namespace std; int map[20][20]; int N; int fishSize = 2, fishCount = 2; int y, x; int dy[] = { -1,0,1,0 }; int dx[] = { 0,1,0,-1 }; bool chk[20][20]; int dist[20][20]; int eaty, eatx; int simulation() { int time = 0; memset(dist, 0, sizeof(dist)); //dist 전부 0으로 채우기 memset(chk, false, sizeof(chk)); //dhk 전부..