C 프로그래밍/SWEA
-
[SWEA 5653] 줄기세포 배양C 프로그래밍/SWEA 2022. 10. 15. 12:16
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWXRJ8EKe48DFAUo SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include int T; int N, M; int K; int in[300 + 2][300 + 2]; int board[1000 + 2][1000 + 2]; struct _st { int r, c; // 좌표 int X; // 생명력 int t; // 언제 해당 상태가 되었는지 }; struct NCOMP { bool operator()(const _st &a, ..
-
[SWEA 2112] 보호 필름C 프로그래밍/SWEA 2022. 10. 12. 20:06
https://swexpertacademy.com/main/talk/solvingClub/problemView.do SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include int T; int R, C, K; int board[13 + 2][20 + 2]; int ans = 0x7fffffff; void input() { //init memset(board, 0, sizeof(board)); ans = 0x7fffffff; scanf("%d %d %d", &R, &C, &K); for (int r = 0; r < R; r++) { for (int c = 0; c < C; ..
-
[SWEA 1953] 탈주범 검거C 프로그래밍/SWEA 2022. 10. 11. 14:56
https://swexpertacademy.com/main/solvingProblem/solvingProblem.do SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include int T; int N, M, R, C, L; int city[50 + 2][50 + 2]; int visited[50 + 2][50 + 2]; int lookup[7 + 2][4 + 2] = { {}, // 0상 1하 2좌 3우 {1, 1, 1, 1},//1 {1, 1, 0, 0},//2 {0, 0, 1, 1},//3 {1, 0, 0, 1},//4 {0, 1, 0, 1},//5 {0, 1, 1, 0..
-
[SWEA 5650] 핀볼 게임C 프로그래밍/SWEA 2022. 10. 5. 20:43
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWXRF8s6ezEDFAUo SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include int T; int N; int board[100 + 2][100 + 2]; int ans; struct _wt { int x, y; }WH[10 + 2][2]; int Blocks[6][4] = { {}, // 0상 1하 2좌 3우 {1, 3, 0, 2}, //1 {3, 0, 1, 2}, //2 {2, 0, 3, 1}, //3 {1, 2, 3, 0}, //4 {1,..
-
[SWEA 1954] 달팽이 숫자C 프로그래밍/SWEA 2022. 8. 18. 00:57
https://swexpertacademy.com/main/solvingProblem/solvingProblem.do SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include int T;//테케수 int N;//달팽이 크기 int board[10 + 2][10 + 2]; int dir_x[4] = { 0, 1, 0, -1 }; //달팽이 방향 따라 //rdlu int dir_y[4] = { 1, 0, -1, 0 }; void get_snail(int N) { int num = 1; int i = 0; int j = 0; int p = 0; for (;;) { if (num > N * N) break; b..