//https://www.acmicpc.net/problem/15683 #include using namespace std; int n, m, tv, mn;int map[8][8];int tvpos[8][3];void input();void dfs(int idx);void update();int main(){ input(); int num=4; if(map[tvpos[0][0]][tvpos[0][1]]==2) num=2; else if(map[tvpos[0][0]][tvpos[0][1]]==5) num=1; mn=64; for(int i=0; i n >> m; for(int i=0; i map[i][j]; if(0
//https://www.acmicpc.net/problem/13460 #include #include using namespace std; #define UP 0#define DOWN 1#define LEFT 2#define RIGHT 3 class ball{public : int x; int y; ball(int _x=0, int _y=0) : x(_x), y(_y) {}};char map[10][10];char cache[11][10][10];int N, M;int mn=11; ball R;ball B;int chk; //map inputvoid input(){ cin >> N >> M; for(int i=0; i map[i][j]; if(map[i][j]=='R'){ R.y=i; R.x=j; } ..
//https://www.acmicpc.net/problem/14502 #include #include #include using namespace std; int map[8][8];int secure[8][8];bool visited[8][8];bool visited2[8][8];int N, M;int mx;int dy[4]={0,0,-1,1};int dx[4]={-1,1,0,0};int virus[10][2];int num;queue q;void input(){ cin >> N >> M; for(int i=0; i map[i][j]; if(map[i][j]==2){ virus[num][0]=i; virus[num++][1]=j; } } }} void solve(int y, int x, int wall..