[코드트리] 술래잡기 체스 (삼성 SW 역량테스트 2020 상반기 오전 2번)
삼성 A형 전체 링크 Codetree 기출문제 링크 https://www.codetree.ai/training-field/frequent-problems/problems/odd-chess2 술래잡기 체스 문제 풀이는 BOJ 19236 : 청소년 상어와 같다.#include int T;int MAP[6][6];typedef struct st2{ int r; int c; int dir; int dead;}CHESS;CHESS horse[17];int dr[] = { 0, -1, -1, 0, 1, 1, 1, 0, -1 };int dc[] = { 0, 0, -1, -1, -1, 0, 1, 1, 1 };int changeDir[] = { 0, 2, 3, 4, 5, 6, 7, 8, 1 };int maxAnswer;..
2024. 6. 8.
[코드트리] 바이러스 백신 (삼성 SW 역량테스트 2019 상반기 오후 2번)
삼성 A형 전체 링크 Codetree 기출문제 링크 https://www.codetree.ai/training-field/frequent-problems/problems/vaccine-for-virus 바이러스 백신 문제 풀이는 BOJ 17142 : 연구소 3과 같다.#include #define MAX (50 + 10)int T;int N, M;int MAP[MAX][MAX];int tmpMAP[MAX][MAX];typedef struct st{ int r; int c;}RC;RC queue[MAX*MAX];int wp, rp;RC virus[MAX*MAX];int vcnt;/* 순서대로 왼쪽, 위, 오른쪽, 아래 */int dr[] = { 0, -1, 0, 1 };int dc[] = { -1, 0, ..
2024. 6. 8.