'상어' 태그의 글 목록
2021.10.03_19237-어른상어
소스코드 #include #include #include #include using namespace std; #define NSIZE 21 #define MSIZE 401 struct Data { int num,cnt; }; struct Pos { int y, x,dir; }; int answer;//결과값 저장 int N, M, K; int board[NSIZE][NSIZE]; Data boardInfo[NSIZE][NSIZE];//상태 확인 int dy[] = { 0,-1,1,0,0 }; int dx[] = { 0,0,0,-1,1 }; int sharkDir[MSIZE][5][5];//상어 각 방향 정보 저장 Pos shark[MSIZE]; bool chkOne(); void init();//초기화..
2021. 10. 3.
2021.09.28_17825_주사위윷놀이
소스코드 #include #include #include #include #include using namespace std; #define S 10 int cube[S];//주사위나온 수 저장 배열 int ret;//결과값 저장변수 int D[S];//1번말 부터 4번말 까지 존재 int B[33] = { 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,-1, 13,16,19,25,22,24,28,27,26,30,35 };//보드의 값 저장 struct Data { int idx, pidx;//현재의 인덱스 값과 이전의 인덱스값 }; void init_input() {//초기화 및 초기 입력 //초기화 ret = 0x80000000;//최소값 저장..
2021. 9. 30.