From 720658bf477b5b3c7f73cbb3bc9d0d6d25cb44ff Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 22 Mar 2025 15:50:49 -0400 Subject: [PATCH] feat(cp): codeforces 900 div 3 --- posts/algorithms/cp-log.html | 59 +++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/posts/algorithms/cp-log.html b/posts/algorithms/cp-log.html index 80c94f5..cdab38a 100644 --- a/posts/algorithms/cp-log.html +++ b/posts/algorithms/cp-log.html @@ -35,6 +35,60 @@

Competitive Programming Log

+

+ 900 (div. 3)—22/3/2025 +

+
+

+ Solved in a coffee shop. Used AI for smaller things (otherwise I'd + have no idea). +

+
    +
  • + A: Solved a much harder problem related to majority element + paths on tree—realized the solution after a minute. +
  • +
  • + B: was confused for about 7 minutes but realized some properties + of divisibility and odd numbers. + Math is still a weakness. Take simpler approaches to complex + constraints, such as considering parity. +
  • +
  • + Went off of gut instinct that it is always possible to form the + given \(x\) if encompassed in the range of numbers. + Failed to prove this mathematical validity but had fair + intuition + (i.e. just "take off one" if too big/small). This is acceptable, + though not perfect. +
  • +
  • + D: cooked. Solved E first and had mentally given up by this + point. + If you've given up, just stop trying and take a break/do + something else. You're wasting your time. +
  • +
  • + E: incredibly easy with segtree. Realized the lower bound/walk + solution after 2-3 minutes. Binary search indexing can be + improved (i.e. which pointer to return?) as well as realizing + one binary search is necessary across both arrays. Good + mathematical deduction to realize relationship between input + arrays. Revisit sparse table + simpler solution—don't be content with an advanced solution when a + simpler/elegant idea also suffices. +
  • +
+

891 (div. 3)Overflow, again. rly dude? -
  • F: doing this later, got the core insight of the minimal weight edge path. Once again, for surveying path
  • +
  • + F: doing this later, got the core insight of the minimal weight + edge path. Once again, for surveying path +
  • cses (range queries, sorting and searching)—1/3/2025