'시뮬레이션' 태그의 글 목록 (7 Page)
본문 바로가기
728x90
반응형

시뮬레이션98

2021.10.09_20061-모노미노도미노2 소스코드 #include #include #include #include using namespace std; #define SIZE 10 int blue[4][SIZE]; int green[SIZE][4]; int N; int t, x, y; int score, finalCnt; void init();//초기화 및 초기 입력 void gamePlay();//게임 시작 int main(void) { int testCase = 1; for (int tc = 1; tc = 2; y--) { green[y][0] = green[y - cnt][0]; green[y][1] = green[y - cnt][1]; green[y][2] = green[y - cnt][2]; green[y][3] = green[y - .. 2021. 10. 10.
2021.10.07_21609-상어중학교 소스코드1 #include #include #include #include #include #include using namespace std; #define SIZE 21 int N, M,answer; int bnum = 1; int B[SIZE][SIZE]; int visit[SIZE][SIZE] = { 0, }; int raindow, blockCnt; int dy[] = { 0,1,0,-1 }; int dx[] = { 1,0,-1,0 }; struct Data { int y, x, cnt,num,bnum; }; vectorblock; bool cmp(Data a, Data b) { if (a.cnt == b.cnt) { if (a.num == b.num) { if (a.y == b.y) { ret.. 2021. 10. 8.
2021.10.05_20058-마법사상어와파이어스톰 소스코드 #include #include #include #include #include using namespace std; #define SIZE 64 int N, Q, answer,sum; int A[SIZE][SIZE]; int power[] = { 1,2,4,8,16,32,64,128,256,512 }; void init();//초기화 및 초기 입력 bool safe(int y, int x);// 범위 체크 void fire();// 파이어 스톰 void melt();// 녹이기 void dfs(int y, int x, int cnt);// 범위체크 int dy[] = { -1,1,0,0 }; int dx[] = { 0,0,-1,1 }; int visit[SIZE][SIZE];//방문체크 int.. 2021. 10. 6.
2021.10.04_20056-마법사상어와파이어볼 소스코드1 #include #include #include #include #include using namespace std; #define SIZE 51 struct Data { int y, x, m, d, s; }; vectorfireBall; int N, M, K, answer; int dy[] = { -1,-1,0,1,1,1,0,-1 }; int dx[] = { 0,1,1,1,0,-1,-1,-1 }; void init();//초기화 및 초기입력 void moveFireBall();//파이어볼 이동 void solve();//결과값 산출 bool cmp(Data a, Data b) { if (a.y == b.y)return a.x < b.x; return a.y < b.y; } int main(v.. 2021. 10. 5.
728x90
반응형