From 42a6d4ec479d0fc5fbaf245368cc246d593e132f Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Thu, 17 Apr 2025 10:30:08 -0400 Subject: [PATCH] feat(codeforces): 937 a-f --- .../competitive-programming-log.html | 80 +++++++++++++++++-- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/posts/algorithms/competitive-programming-log.html b/posts/algorithms/competitive-programming-log.html index 038e25f..8448e20 100644 --- a/posts/algorithms/competitive-programming-log.html +++ b/posts/algorithms/competitive-programming-log.html @@ -24,6 +24,71 @@

competitive programming log

+

+ 937 (div. 4) + +

+
+ ~1300 performance. Consistently finishing E, getting F occasionally. +
+
    +
  1. + B: took me way too long because I just wanted to code. Wasted 5 + minutes when I know better—patience and a formula got me + there in 30 seconds. +
  2. +
    + Impatience is holding me back. Lack of discipline and focus is + holding me back. It doesn't just harm my ranking + problem-solving ability but it + prevents me from improving. +
    +
  3. C: submitted without rigorously checking all edge cases.
  4. +
  5. + D: misunderstood the problem statement twice. Polya and Zeitz both + advise to fully understand exactly what the problem statement is + asking, whether through direct analysis or examples. Then, I + messed up the brute force. However, I did notice that raw + recursion would not TLE based on the fact that each number can be + divided in only a few ways. +
  6. +
  7. + E: I knew a number didn't have that many divisors but the + implementation took me too long. + Pay closer attention to the constraints and just solve the + problem.. Spend a bit more time on implementation, + even if you know a way that works. Here, I knew an approach + to code but it was easily error-prone. +
  8. +
  9. + Immediately came up with the idea but was unable to express it in + code. This means I did not fully understand the problem, namely + with some core mistakes: +
      +
    1. The tree it not necessarily binary
    2. +
    3. + C's cannot have children, so tracking depth/available nodes to + fill per level is crucial +
    4. +
    5. + Coming up with the expression \(a=c+1\) (and ensuring the + input conforms to that) is a lot easier than cusotm coding + logic to ensure levels are filled out properly. The core + problem is that I lack the mathematical prowess to be certain + of what exactly I need to check after I make that assertion + and why. In this case, it means that the number of C's is + appropriate, so I never even need to check them—I + just need to make sure that the rest of the solution is valid. +
    6. +
    +
  10. +

1017 (div. 4) -

cses (range queries, sorting and searching) +

+ cses (range queries, sorting and searching) @@ -833,7 +899,8 @@ -

sorting and searching +

+ sorting and searching @@ -897,7 +964,8 @@ -

more cses +

+ more cses @@ -931,7 +999,8 @@ -

cses +

+ cses @@ -1157,7 +1226,8 @@ -

the beginning +

+ the beginning