feat(codeforces): 970

This commit is contained in:
Barrett Ruth 2025-04-21 14:59:20 -04:00
parent 42a6d4ec47
commit 7a9213bb9d

View file

@ -24,6 +24,71 @@
<h1 class="post-title">competitive programming log</h1>
</header>
<article class="post-article">
<h2>
<a href="https://codeforces.com/contest/2008" target="_blank"
>970 (div. 3)</a
>
<span class="post-meta">
<time datetime="2025-04-21">04/21/2025</time>
</span>
</h2>
<div>
~1450 performance. OK contest, not very exhilirating. Hedonistic
treadmill at work with me solving A-F on Div. 3 when a 2 weeks ago I
couldn't even do that on Div. 4. Definitely need to upsolve this to
improve my ability at expressing ideas simply.
</div>
<blockquote>
From now on, prioritize actually <i>learning</i> and problem-solving
in a pressurized format (we all die eventually, everything is under
pressure).
<ul>
<li>Never report rating in these logs</li>
<li>
Implement all dsa from scratch (modular arithmetic, data
structures, etc.)
</li>
</ul>
</blockquote>
<ol>
<li>
A: somehow got a wrong answer. unbelievable, brute forced it. math
is poor. why reason/be ensure when you can brute force?
</li>
<li>
B: didn't outline a simple strategy and got cooked. For example, I
didn't check that the grid was a square after redoing my
implementation for the third time.
</li>
<li>C: trivial</li>
<li>
D: tried a dsu approach before realizing the graph is not
direction. DP + DFS + DSU weakness all combined to confuse me. In
retrospect, just think about solving the problem in one way. Model
it as a graph, do tortoise and hare, or do DP.
<b>One approach at a time</b>. I tangibly need to improve my
reasoning on harder problems when there are many moving parts.
However, I'm unsure of how to move forward here because I'm
fighting an uphill battle against a) my basic understanding of
algorithms and b) my actual reasoning ability. I need to improve
both the basics and my ability to think when facing <i>new</i>
problems/frameworks&mdash;that's the sign of a good
problem-solver.
</li>
<li>
E: realized the greedy approach + pref/post-fix greedy on deletion
but implementation absolutely annahilated me here. Further,
<b>my exchange argument/greedy proofs are nightmarishly bad</b>
and I resulted in just "trusting" the two-max greedy approach.
This also harms my ability/intuition for dp/not doing dp. Work on
this.
</li>
<li>
F: easy, counting pairs and modular arithmetic. However, I had to
copy the modular arithmetic online. My grasp of this is still not
good enough because I haven't practiced enough number theory.
</li>
</ol>
<h2>
<a href="https://codeforces.com/contest/2094" target="_blank"
>937 (div. 4)</a
@ -1246,8 +1311,8 @@
logs, and more. For now, I'll be practicing on
<a href="https://codeforces.com" target="_blank">CodeForces</a>
(account
<a href="https://codeforces.com/profile/sigill" target="_blank"
>sigill</a
<a href="https://codeforces.com/profile/sigpipe" target="_blank"
>sigpipe</a
>) and <a href="https://cses.fi" target="_blank">CSES</a>, using
the
<a href="https://cses.fi/book/book.pdf" target="_blank"