SM Training Camp Notes (2024.11.15 ~ 2024.11.29)
DAY0 (2024.11.15)
Finally arriving at the camp.
T2 GYM104787M
First, we define a replica connected component as a connected component formed by traversing only nodes with index greater than n. It's not hard to observe that a replica connected component (green nodes) connects to several leaves with index less than n, and together with the origin ...
Posted on Fri, 10 Jul 2026 17:44:56 +0000 by raffael3d
Heavy-Light Decomposition Template for Tree Path Queries
The following C++ implementation demonstrates a complete Heavy-Light Decomposition (HLD) framework integrated with a lazy propagation segment tree to support efficient path updates and queries on trees. It passes the standard template problem on Luogu.
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int MOD;
struct ...
Posted on Mon, 18 May 2026 00:02:42 +0000 by swizzer
CSP 2025 Simulation Problems - Technical Analysis and Solutions
Problem Set Overview
This document presents detailed solutions for four computational problems from a recent programming contest simulation. Each problem requires distinct algorithmic approaches, ranging from greedy selection with block decomposition to probabilistic expectation calculations on bounded domains. The solutions presented have been ...
Posted on Sat, 16 May 2026 11:29:24 +0000 by missdeath