[코드트리] 아기 고래의 첫 항해 (삼성 SW 역량테스트 2026 상반기 오전 2번)
A형 필수 알고리즘을 체계적으로 배우고 싶다면? (인프런 바로가기) https://www.codetree.ai/ko/frequent-problems/samsung-sw/problems/baby-whale-first-voyage 전체 코드는 다음과 같다. #include #define MAX (50 + 5)#define INF (0x7fff0000)#define ROCK (1)#define UP (1)#define DOWN (2)#define LEFT (3)#define RIGHT (4)int T;int N, R, C, D;int MAP[MAX][MAX];int check[MAX][MAX];// 0, 상, 하, 좌, 우int dr[] = { 0, -1, 1, 0, 0 };int dc[] = { 0, 0, ..
2026. 4. 19.
[코드트리] 아기 바다거북의 대모험: 해저 화산 지대 (삼성 SW 역량테스트 2026 상반기 오전 1번)
A형 필수 알고리즘을 체계적으로 배우고 싶다면? (인프런 바로가기) https://www.codetree.ai/ko/frequent-problems/samsung-sw/problems/a-little-sea-turtles-big-adventure 참고- 코드트리 빵 (삼성 SW 역량테스트 2022 하반기 오후 1번) 전체 코드는 다음과 같다.#include #define MAX (20 + 5)#define CORAL (1)int T;int N, M, K;int MAP[MAX][MAX];int P[MAX][MAX];int current[MAX][MAX];// 우하좌상 →, ↓, ←, ↑,int dr[] = { 0, 1, 0, -1 };int dc[] = { 1, 0, -1, 0 };struct RC{ in..
2026. 4. 18.
주성분 분석 Biplot
전체 링크 Biplot- 데이터는 어디에 모여 있고, 그 원인이 되는 변수는 무엇인가를 한 번에 보여주는 그래프import numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom sklearn.preprocessing import StandardScalerfrom sklearn.decomposition import PCA# 샘플 데이터 생성np.random.seed(0)X = pd.DataFrame({ "Length": np.random.normal(10, 2, 50), "Width": np.random.normal(5, 1, 50), "Height": np.random.normal(7, 1.5, 50), "Weight..
2026. 1. 18.