/ https://42jerrykim.github.io/ _index.md
Avatar

42JerryKim

42는 'The Hitchhiker's Guide to the Galaxy'라는 SF 소설에서 삶, 우주, 그리고 모든 것에 대한 궁극적인 질문에 대한 해답이다.

  1. Home
  2. Collections
  3. Search
  4. Categories
  5. Tags
  6. Archives
    1. Dark Mode

Categories

Algorithm Vocabulary BOJ English Graph Movie Math Design Pattern Geometry CSharp

Tags

Documentation 문서화 Best-Practices Implementation 구현 Tutorial Code-Quality Testing Go Optimization 테스트 Education Guide 코드품질 가이드 최적화 교육 C++ Algorithm Technology

Archives

2026 153
2025 420
2024 178
2023 24
2022 79
More
Featured image of post [Algorithm] C++ 백준 10050번: 블록
Algorithm BOJ Constructive Divide and Conquer

[Algorithm] C++ 백준 10050번: 블록

초기 BABABA…(길이 2N)을 인접한 2블록 이동으로 A^N B^N 형태로 만든다. 최소 N회가 하한이고, n=3~7 기저 + n-4 해를 평행이동하는 재귀로 정확히 N회를 구성한다.

12월 20, 2025
3 minute read
Featured image of post [Algorithm] C++ 백준 13543번: 수열과 쿼리 2
Algorithm BOJ Data Structure Treap Randomized BST Implicit Treap Binomial Theorem Polynomial

[Algorithm] C++ 백준 13543번: 수열과 쿼리 2

삽입/삭제/갱신이 있는 동적 수열에서 구간 다항 가중합을 구한다. implicit treap에 ΣAi·i^k(0≤k≤10)을 저장하고 이항정리로 merge 시 shift를 계산해 O(K^2 log N)으로 처리한다.

12월 20, 2025
4 minute read
Featured image of post [Algorithm] C++ 백준 17372번: 피보나치 수의 최대공약수의 합
Algorithm BOJ Number-Theory Mobius Inversion Fibonacci

[Algorithm] C++ 백준 17372번: 피보나치 수의 최대공약수의 합

gcd(Fi,Fj)=F_gcd(i,j) 성질을 이용해 이중합을 Möbius 반전으로 Σ g(d)⌊n/d⌋²로 바꾸고, Mertens 함수 + 피보나치 fast doubling으로 n≤1e9을 처리한다.

12월 20, 2025
5 minute read
Featured image of post [Algorithm] C++ 백준 32231번: 재우의 삼수강
Algorithm BOJ Geometry Calculus Hyperbolic Geometry

[Algorithm] C++ 백준 32231번: 재우의 삼수강

밀도 ρ=1/y인 수영장에서 단위거리 이동 시간이 ρ초이므로, 총 시간은 ∫(ds/y)로 주어진다. 이는 상반평면 모델의 쌍곡거리이며 acosh(1+Δ/(2y1y2))로 최소 시간을 O(1)에 계산한다.

12월 20, 2025
2 minute read
Featured image of post [Algorithm] C++ 백준 3752번: 최대공약수 행렬식
Algorithm BOJ Number-Theory Matrix Determinant

[Algorithm] C++ 백준 3752번: 최대공약수 행렬식

인수에 대해 닫힌 집합 S에서 gcd(xi,xj)로 만든 GCD 행렬의 행렬식은 Smith 정리에 의해 ∏_{x∈S} φ(x)로 단순화된다. 각 원소를 소인수분해해 오일러 피함수를 곱해 mod 1e9+7로 계산한다.

12월 20, 2025
3 minute read
Featured image of post [PowerShell] Frontmatter Description 누락 파일 찾기
PowerShell Hugo

[PowerShell] Frontmatter Description 누락 파일 찾기

Cursor/VSCode에서 멀티라인 frontmatter 검색의 한계를 극복하고, PowerShell만으로 description이 없는 마크다운 파일을 찾아내는 방법을 단계별로 안내합니다. draft:true 제외 로직과 정규식 설명 포함.

12월 20, 2025
5 minute read
Featured image of post [Algorithm] C++ 백준 1185번: 유럽여행
Algorithm BOJ Graph MST Kruskal

[Algorithm] C++ 백준 1185번: 유럽여행

도시 방문비와 도로 통행료가 있을 때 모든 도시를 최소 한 번 방문하고 시작점으로 돌아오는 최소 비용을 구한다. 간선 비용을 2L+Cu+Cv로 변형해 크루스칼 MST 후 최소 Cu를 더한다.

12월 19, 2025
4 minute read
Featured image of post [Algorithm] C++ 백준 13324번: BOJ 수열 2
Algorithm BOJ Greedy Priority Queue Data Structure

[Algorithm] C++ 백준 13324번: BOJ 수열 2

A_i-i로 변환해 B1<…<BN 조건을 비내림 제약으로 바꾸고, prefix 중앙값(힙 2번 push 1번 pop)으로 L1 오차 최소를 만든다. 역방향 최소 보정 후 B를 출력한다.

12월 19, 2025
3 minute read
Featured image of post [Algorithm] C++ 백준 13539번: 트리와 쿼리 11
Algorithm BOJ Data Structure Tree Dynamic Tree

[Algorithm] C++ 백준 13539번: 트리와 쿼리 11

루트가 있는 동적 포리스트에서 link/cut과 LCA 쿼리를 처리한다. Link-Cut Tree의 access로 간선 연결/분리와 LCA를 모두 O(log N) 분할상환으로 해결한다.

12월 19, 2025
4 minute read
Featured image of post [Algorithm] C++ 백준 14853번: 동전 던지기
Algorithm BOJ Probability Bayesian Math

[Algorithm] C++ 백준 14853번: 동전 던지기

관측된 앞면 횟수로 각 동전의 확률 p,q의 사후분포를 Beta로 만들고, P(p<q)를 Beta 함수 합으로 닫힌형태 계산한다. 로그 팩토리얼로 수치 안정성을 확보해 T=1e5도 처리한다.

12월 19, 2025
1 minute read
1 13 14 15 16 17 18 19 20 21 90
© 2018 - 2026 42JerryKim
Built with Hugo
Theme Stack designed by Jimmy