[2174번] 로봇 시뮬레이션
2174번: 로봇 시뮬레이션 www.acmicpc.net #include #include using namespace std; int A, B, N, M;//가로(열), 세로(행), 로봇 수, 명령어 수 int Map[101][101]; struct Robot { int r, c, dir; }Rbt[101];//로봇 방향 저장, 배열의 번호 = 로봇 넘버 (1번째 배열부터 사용) struct Commend { int R_num; char commd; int times; }temp; queueQ; int select_R, crashed_R; bool crash_flag = 0; int chk(int r_num, int r, int c) { //반환값 0 : 정상 , 1:벽충돌, 2:로봇끼리 충돌 selec..
2019. 1. 17.