Blog
Findings, know-how, essays, and the occasional rant.
Software and systems, cognitive science and AI, and older posts in Chinese from my competitive programming years.
C++ | Comparing const and constexpr
Compares the semantics of const and constexpr in C++ for objects and functions, with examples covering member functions and constexpr functions.
Editorial | "HDU 3501" Calculation 2
Editorial for HDU 3501, using Euler's totient function to prove that the sum of numbers less than n and coprime to n equals n×φ(n)/2.
Editorial | "LightOJ 1289" LCM from 1 to n
Editorial for LightOJ 1289, computing lcm(1,2,...,n) in O(n) with a linear sieve plus a recurrence relation.