CCPC 2021 Online - E Review: Periodic Prefixes and Congruence Classes
Split each time in a cyclic walk into complete cycles and a position within one cycle, then maintain the earliest arrival time in congruence classes modulo the…
Split each time in a cyclic walk into complete cycles and a position within one cycle, then maintain the earliest arrival time in congruence classes modulo the…
Classify fragrant subsequences by the final h of nunhehheh, count prefix choices with fixed-pattern subsequence DP, then multiply by the nonempty choices of su…
Split valid contiguous segments in the full-permutation sequence into those within a permutation and those crossing adjacent permutation boundaries. Count usin…
A review of k-multiple inversion pairs, starting from a standard inversion-counting template and examining how a changed condition affects query boundaries and…
A review of simulating the lilac fractal: starting with the basic pattern, separating odd-step expansion from even-step rearrangement, and examining recurrence…
A review of Luogu P1121, using case analysis and a complementary formulation to turn a circular selection problem into linear DP, with an analysis and fix for…
A review of Luogu P1133, the Leader's Garden: starting with an incorrect linear DP model, examining the limits of patching circular constraints afterward, and…
A review of Luogu P8613, Children Queuing: connecting bubble sort to inversions, using a Fenwick tree to count the inversions involving each element, and exami…
Starting with increasing triples in Luogu P1637 and extending to strictly increasing subsequences of length k in SPOJ INCSEQ, this review develops a general ap…
A review of a substring-counting problem, moving from brute-force enumeration to counting prefix-difference states and using inclusion–exclusion to handle repe…
A review of exact coverage by interval unions. Model two pieces of cloth covering a query interval exactly as an interval-union test, split valid arrangements…
A review of a combinatorial counting problem, starting from an adjacency constraint, turning an awkward arrangement condition into a structure we can enumerate…
A review of the Codeforces 1065 C1/C2 XOR games, starting from the invariant total XOR and examining how the most significant bit and the last critical index d…
A complete review of Lanqiao Cup 2026 Provincial Group B, from preparation and contest decisions to redoing the problems afterward, examining in-contest thinki…
A review of an unconventional solution to P3369, Ordinary Balanced Tree: maintaining an ordered multiset with a binary trie instead of a Treap or Splay tree.