diff --git a/posts/algorithms/cp-log.html b/posts/algorithms/cp-log.html index 351848f..3f197ba 100644 --- a/posts/algorithms/cp-log.html +++ b/posts/algorithms/cp-log.html @@ -36,23 +36,158 @@

the beginning—12/2/2025

+
+

+ This marks the (true) beginning of my competitive programming + journey. By "true" I mean intentional, focused, daily practice. + Driven by my admiration for competitive programmers, love of + challenge, and desire for a decent new-grad job, I'm excited to + start putting in the work. +

+

+ This webpage will be an archive of everything related to this + process, including my practice strategies, setup, shortcomings, + logs, and more. For now, I'll be practicing on + CodeForces + (account + sigill) and CSES, using + the + CP Handbook + and browsing by related problem tags with ever-increasing + difficulty. +

+
+

+ 938 (div. 3)—15/2/2025 +

+
+

+ What would've been my best contest. Unfortunately, CodeForces + decided to go down for TREE[3] centuries, which absolutely ruined + my groove in the contest and terminated my virtual. No excuses, + though, as I set a timer and finished up later. +

+
+

A

+

Brute-forced it but it still took me a few minutes.

+ +

B

- This marks the (true) beginning of my competitive programming - journey. By "true" I mean intentional, focused, daily practice. - Driven by my admiration for competitive programmers, love of - challenge, and desire for a decent new-grad job, I'm excited to - start putting in the work. + Easily recognized how to form the matrix (i.e. smallest element + first with positive integers \(c,d\)) but tripped up on the + implementation.

+ +

C

- This webpage will be an archive of everything related to this - process, including my practice strategies, setup, shortcomings, logs, and - more. For now, I'll be practicing on - CodeForces (account - sigill) and - CSES, using the - CP Handbook and browsing by related problem tags with - ever-increasing difficulty. + Did a horrific (but correct) binary search solution. Tripped up by + specifics of std::{upper,lower}_bound regardless. + Technically, generating the prefix and postfix arrays takes two + passes and two binary searches to find the answer but this is still + more inefficient than the trivial linear scan.

+ +

D

+

+ Instantly recognized sliding window but struggled with minor details + (i.e. keeping track of match count) by rushing to the solution. +

+ +

E

+

+ I had mentally tapped out by this point (I submitted a TLE \(O(n^2k) + solution without using my brain\). I solved F first, then took a + look at G before coming back to E, robbing me of 10 minutes + that could've been the difference between another solve. +

+ +

F

+

+ Had the solution quickly but overcomplicated the implementation. + Walked through the examples and took my time. +

+ +

G

+

+ Wasted time believing this was primitive DP, when it totally wasn't. +

+