본문 바로가기
반응형

시뮬레이션89

[코드트리] 시공의 돌풍 (삼성 SW 역량테스트 2019 상반기 오전 1번) SW 역량테스트 합격하기 A형 강의 오픈!! (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/heros-of-storm 시공의 돌풍 문제 풀이는 BOJ 17144 : 미세먼지 안녕! 과 같다.#include #define MAX (50 + 10)int T;int R, C, time;int MAP[MAX][MAX];typedef struct st{ int r; int c;}RC;RC tornado[2];int tcnt;void input(){ scanf("%d %d %d", &R, &C, &time); tcnt = 0; for (int r = 1; r 0) { int cnt, dust;.. 2024. 6. 8.
[코드트리] 전투 로봇 (삼성 SW 역량테스트 2018 하반기 오후 2번) SW 역량테스트 합격하기 A형 강의 오픈!! (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/fighting-robot 전투 로봇 문제 풀이는 BOJ 16236 : 아기 상어와 같다.#include #define MAX (20 + 10)int T;int N;int MAP[MAX][MAX];int visit[MAX][MAX];typedef struct st1{ int r; int c; int eat; int size;}ROBOT;ROBOT attackRobot;typedef struct st2{ int r; int c;}QUEUE;QUEUE queue[MAX * MAX];int wp, rp;int.. 2024. 6. 8.
[코드트리] 바이러스 실험 (삼성 SW 역량테스트 2018 하반기 오후 1번) SW 역량테스트 합격하기 A형 강의 오픈!! (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/virus-experiment 바이러스 실험 문제 풀이는 BOJ 16235 : 나무 재테크와 같다.#include #define MAX (10 + 5)int T;int N, M, K;int energy[MAX][MAX];int A[MAX][MAX];int virus[MAX][MAX][50000 + 50000];int front[MAX][MAX];int back[MAX][MAX];int dr[] = { -1, -1, -1, 0, 0, 1, 1, 1 };int dc[] = { -1, 0, 1, -1, 1, .. 2024. 6. 8.
[코드트리] 토스트 계란틀 (삼성 SW 역량테스트 2018 하반기 오전 2번) SW 역량테스트 합격하기 A형 강의 오픈!! (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/toast-eggmold 토스트 계란틀 문제 풀이는 BOJ 16234 : 인구 이동과 같다.#include #define MAX (100 + 20)#define abs(a) (((a) > 0) ? (a) : -(a))int T;int N, L, R;int A[MAX][MAX];typedef struct st{ int r; int c;}QUEUE;QUEUE queue[MAX * MAX];int wp, rp;void input(){ scanf("%d %d %d", &N, &L, &R); for (int r .. 2024. 6. 8.
[코드트리] 드래곤 커브 (삼성 SW 역량테스트 2018 상반기 오후 1번) A형 필수 알고리즘을 체계적으로 배우고 싶다면? (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/dragon-curve 드래곤 커브 문제 풀이는 BOJ 15685 : 드래곤 커브와 같다. (x, y 좌표가 반대)#include #define MAX (100 + 20)int T;int N, y, x, d, g;int MAP[MAX][MAX];int moveList[2000];int dx[] = { 0, -1, 0, 1 };int dy[] = { 1, 0, -1, 0 };void DFS(int L, int length){ if (L > g) return; for (int i = length + 1; i 2024. 6. 7.
[코드트리] 돌아가는 팔각의자 (삼성 SW 역량테스트 2017 하반기 오후 1번) A형 필수 알고리즘을 체계적으로 배우고 싶다면? (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/rounding-eight-angle 돌아가는 팔각의자 문제 풀이는 BOJ 14891 : 톱니바퀴와 같다.#include #define MAX (100 + 20)int T;int wheel[5][10];int N;int number[MAX];int direct[MAX];int list[6];void input(){ for (int number = 1; number = 2; index--) { wheel[number][index] = wheel[number][index - 1]; } wheel.. 2024. 6. 7.
[코드트리] 자율주행 자동차 (삼성 SW 역량테스트 2017 상반기 오후 1번) A형 필수 알고리즘을 체계적으로 배우고 싶다면? (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/autonomous-driving 자율주행 자동차 문제 풀이는 BOJ 14503 : 로봇 청소기와 같다.#include #define MAX (50 + 5)int T;int N, M, R, C, D;int MAP[MAX][MAX];int dr[] = { -1, 0, 1, 0 };int dc[] = { 0, 1, 0, -1 };void input(){ scanf("%d %d %d %d %d", &N, &M, &R, &C, &D); for (int r = 0; r 2024. 6. 6.
[코드트리] 정육면체 굴리기 (삼성 SW 역량테스트 2016 하반기 1번 문제) A형 필수 알고리즘을 체계적으로 배우고 싶다면? (인프런 바로가기) 삼성 A형 전체 링크 https://www.codetree.ai/training-field/frequent-problems/problems/cube-rounding 정육면체 굴리기 문제 풀이는 BOJ 14499 : 주사위 굴리기와 같다.#include #define MAX (20+5)int T;int N, M, X, Y, K;int MAP[MAX][MAX];int command[1000 + 50];typedef struct st{ int up; int left; int top; int right; int down; int bottom;}CUBE;CUBE cube;int dr[] = { 0, 0, 0, -1, 1 };int dc[] = {.. 2024. 6. 5.
BOJ 23291 : 어항 정리 (삼성 SW TEST A형) A형 필수 알고리즘을 체계적으로 배우고 싶다면? (인프런 바로가기) 삼성 A형 전체 링크 www.acmicpc.net/workbook/view/1152 (A형 문제집) https://www.acmicpc.net/problem/23291 어항은 N x N 배열의 row = N 부터 채워나간다.#define MAX (100 + 10)int N, K;int FISH[MAX][MAX];void input(){ scanf("%d %d", &N, &K); for (int i = 1; i  main은 아래와 같이 구성된다. addFish() - 가장 적은 어항에 물고기 추가move() - 가능한 만큼 어항 쌓기spreadFish() - 물고기의 이동fishSort() - 어항 재정리fold() - 어항 2번 접기sp.. 2021. 11. 6.
반응형