[코드트리] 원자 충돌 (삼성 SW 역량테스트 2020 하반기 오전 2번)
SW 역량테스트 합격하기 A형 강의 오픈!! (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/atom-collision 원자 충돌 문제 풀이는 BOJ 20056 : 마법사 상어와 파이어볼과 같다.#include #define MAX (50 + 5)int T;int N, M, K;typedef struct st1{ int r; int c; int m; int s; int d;}ATOM;ATOM atom[10000 + 5000];int acnt;int dr[] = { -1, -1, 0, 1, 1, 1, 0, -1 };int dc[] = { 0, 1, 1, 1, 0, -1, -1, -1 };typed..
2024. 6. 9.
[코드트리] 술래잡기 체스 (삼성 SW 역량테스트 2020 상반기 오전 2번)
SW 역량테스트 합격하기 A형 강의 오픈!! (인프런 바로가기) 삼성 A형 전체 링크 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,..
2024. 6. 8.