feat(cp-log): 1020
This commit is contained in:
parent
7a9213bb9d
commit
817985e42a
1 changed files with 181 additions and 169 deletions
|
|
@ -24,6 +24,24 @@
|
|||
<h1 class="post-title">competitive programming log</h1>
|
||||
</header>
|
||||
<article class="post-article">
|
||||
<h2>
|
||||
<a href="https://codeforces.com/contest/2106" target="_blank"
|
||||
>1020 (div. 3)</a
|
||||
>
|
||||
<span class="post-meta">
|
||||
<time datetime="2025-04-25">04/25/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<p>
|
||||
Unfortunately, the moment this contest started I'd already given up.
|
||||
In contest my main weakness is that I just rush and panic. If my
|
||||
next contest results in me wasting 2 hours I'm going to take a step
|
||||
back and just do intentional practice.
|
||||
</p>
|
||||
<p>
|
||||
I learned nothing. I didn't read problem statements nor prove my
|
||||
answers.
|
||||
</p>
|
||||
<h2>
|
||||
<a href="https://codeforces.com/contest/2008" target="_blank"
|
||||
>970 (div. 3)</a
|
||||
|
|
@ -32,12 +50,12 @@
|
|||
<time datetime="2025-04-21">04/21/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
~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>
|
||||
</p>
|
||||
<blockquote>
|
||||
From now on, prioritize actually <i>learning</i> and problem-solving
|
||||
in a pressurized format (we all die eventually, everything is under
|
||||
|
|
@ -97,9 +115,9 @@
|
|||
<time datetime="2025-04-16">04/16/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
~1300 performance. Consistently finishing E, getting F occasionally.
|
||||
</div>
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
B: took me way too long because I just wanted to code. Wasted 5
|
||||
|
|
@ -162,11 +180,11 @@
|
|||
<time datetime="2025-04-14">04/14/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
Decent contest. Lost focus near the end and was not paying attention
|
||||
at the start (I was working on my makefile). This is a telltale sign
|
||||
that Div. 4 is a bit too easy. F & G should've been lightwork.
|
||||
</div>
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
D: submitted what I knew to be incorrect. Can't account for
|
||||
|
|
@ -206,23 +224,23 @@
|
|||
<time datetime="2025-04-10">04/10/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
Improvement is marginal. My desire for rating is unquenchable
|
||||
(joke). Really, though, I'm improving slower than I like. 1400
|
||||
performance, my best yet—I'll do one more Div. 4 then I need
|
||||
to upgrade to Div. {2,3}. I think the most core realization I made
|
||||
after this contest was:
|
||||
<blockquote>
|
||||
Separate what your code does from what you think it should do.
|
||||
Conceptualize an approach, then put it aside. Implement exactly
|
||||
what the approach says to do (not what you think it should say).
|
||||
If the approach left something out,
|
||||
<i
|
||||
>step away from implementing, reconsider the approach, then
|
||||
resume implementing</i
|
||||
>. <b>Never reconsider and alter your strategy while coding.</b>
|
||||
</blockquote>
|
||||
</div>
|
||||
</p>
|
||||
<blockquote>
|
||||
Separate what your code does from what you think it should do.
|
||||
Conceptualize an approach, then put it aside. Implement exactly what
|
||||
the approach says to do (not what you think it should say). If the
|
||||
approach left something out,
|
||||
<i
|
||||
>step away from implementing, reconsider the approach, then resume
|
||||
implementing</i
|
||||
>. <b>Never reconsider and alter your strategy while coding.</b>
|
||||
</blockquote>
|
||||
<ol>
|
||||
<li>
|
||||
B: realized parity-based removal immediately. Still, I once again
|
||||
|
|
@ -307,11 +325,11 @@
|
|||
<time datetime="2025-04-09">04/09/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
Defeating. My speed is improving but I completely wasted my focus.
|
||||
Div. 4 is too easy for me to take seriously now. This itself,
|
||||
though, is a problem with discipline.
|
||||
</div>
|
||||
</p>
|
||||
<blockquote>
|
||||
I only practice for 2 hours a day. There's no point in practicing
|
||||
problems and not trying—just go do something else.
|
||||
|
|
@ -365,10 +383,10 @@
|
|||
<time datetime="2025-04-08">04/08/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
Horrendous competition but I refrain from cringing for the sake of
|
||||
improvement.
|
||||
</div>
|
||||
</p>
|
||||
<ul>
|
||||
<li>A: trivial</li>
|
||||
<li>
|
||||
|
|
@ -439,17 +457,19 @@
|
|||
<time datetime="2025-04-03">04/03/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
Placed top 2000 but did not learn much. Was distracted (thinking
|
||||
about writing this post itself) and was not taking the problems
|
||||
seriously because they were not that challenging in the first place.
|
||||
<blockquote>
|
||||
Take problems seriously or you're wasting your time.
|
||||
</blockquote>
|
||||
. I was also continually nervous/pressuring myself and thought about
|
||||
</p>
|
||||
<blockquote>
|
||||
Take problems seriously or you're wasting your time.
|
||||
</blockquote>
|
||||
<p>
|
||||
I was also continually nervous/pressuring myself and thought about
|
||||
my own thought process. The time for analysis is after, not during.
|
||||
<blockquote>Pressure ruins performance.</blockquote>
|
||||
</div>
|
||||
</p>
|
||||
<blockquote>Pressure ruins performance.</blockquote>
|
||||
<ul>
|
||||
<li>
|
||||
A: couldn't come up with the extensible solution and checked all
|
||||
|
|
@ -495,7 +515,7 @@
|
|||
<time datetime="2025-03-28">03/28/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
Div. 4 to practice implemenation skills + mathematical observations
|
||||
thanks to
|
||||
<a
|
||||
|
|
@ -503,7 +523,7 @@
|
|||
target="_blank"
|
||||
>Paul Zeitz</a
|
||||
>. From now on, I will only note useful problems.
|
||||
</div>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
B: typo, costing a few minutes. Go slower. Declare variables.
|
||||
|
|
@ -587,70 +607,68 @@
|
|||
<time datetime="2025-03-26">03/26/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>Decent.</p>
|
||||
<ul>
|
||||
<li>
|
||||
A: math intuition building. Jumped to assuming the problem
|
||||
statement but it was much simpler.
|
||||
<b>Answer the problem only.</b>
|
||||
</li>
|
||||
<li>
|
||||
B: textbook simple problem that I struggle to mathematically
|
||||
quantify being distracted by many components. In retrospect, I
|
||||
should interpret the problem simply like:
|
||||
<blockquote>
|
||||
Each trap has a known time I must return by. The answer is
|
||||
therefore the minimum of these.
|
||||
</blockquote>
|
||||
I also just plug in \(ceil\) and \(floor\) until I find the
|
||||
right answer (I'm not lying). Instead, note that for
|
||||
\(s,k\in\mathbb{Z}\),
|
||||
\[\frac{s}{2}>k\leftrightarrow\lfloor\frac{s-1}{2}\rfloor\geq
|
||||
k\]. This simply "edges out" the fractional term to line up
|
||||
cleanly with the divisor.
|
||||
</li>
|
||||
<li>C: cooked. <b>Practice number theory.</b></li>
|
||||
<li>
|
||||
D: took me a while because I was distracted with the moving
|
||||
parts. Specifically, I forgot that I could choose the
|
||||
permutation and that the question was merely asking to pick the
|
||||
largest/smallest numbers on \(x\)/\(y\) slots respectively. End
|
||||
solution was expressive and elegant.
|
||||
<b
|
||||
>Express the question and reframe the constraints in simple
|
||||
but accurate terms</b
|
||||
>.
|
||||
</li>
|
||||
<li>
|
||||
E: Black-boxed a lazy segment tree (with the help of AI, I must
|
||||
admit—I need to make a template).
|
||||
<blockquote>
|
||||
<i
|
||||
>Everything I did here was wrong and this problem showed an
|
||||
embarrassingly fundamental flaw in my practice strategy.</i
|
||||
>
|
||||
</blockquote>
|
||||
Namely, I should divide up practice time into:
|
||||
<ol>
|
||||
<li>Contests, emphasizing speed and implementation</li>
|
||||
<li>
|
||||
Single problems, emphasizing specific learning objectives
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
In this problem, I immediately saw the application of the lazy
|
||||
segment tree but decided to hold off on it, failing to find the
|
||||
simpler prefix-XOR solution. Therefore, I not only wasted my time,
|
||||
but also cemented in unrealistic practice (I would never do this
|
||||
in a real contest) and worsened my virtual contest performance. As
|
||||
for the prefix-XOR solution, focusing on just one/zero
|
||||
corresponding elements and
|
||||
<b>walking through small examples</b>
|
||||
(i.e. "what happens when \(l=r\)?") would've help me pick up the
|
||||
pattern.
|
||||
</ul>
|
||||
</div>
|
||||
<p>Decent.</p>
|
||||
<ul>
|
||||
<li>
|
||||
A: math intuition building. Jumped to assuming the problem
|
||||
statement but it was much simpler.
|
||||
<b>Answer the problem only.</b>
|
||||
</li>
|
||||
<li>
|
||||
B: textbook simple problem that I struggle to mathematically
|
||||
quantify being distracted by many components. In retrospect, I
|
||||
should interpret the problem simply like:
|
||||
<blockquote>
|
||||
Each trap has a known time I must return by. The answer is
|
||||
therefore the minimum of these.
|
||||
</blockquote>
|
||||
I also just plug in \(ceil\) and \(floor\) until I find the right
|
||||
answer (I'm not lying). Instead, note that for
|
||||
\(s,k\in\mathbb{Z}\),
|
||||
\[\frac{s}{2}>k\leftrightarrow\lfloor\frac{s-1}{2}\rfloor\geq k\].
|
||||
This simply "edges out" the fractional term to line up cleanly
|
||||
with the divisor.
|
||||
</li>
|
||||
<li>C: cooked. <b>Practice number theory.</b></li>
|
||||
<li>
|
||||
D: took me a while because I was distracted with the moving parts.
|
||||
Specifically, I forgot that I could choose the permutation and
|
||||
that the question was merely asking to pick the largest/smallest
|
||||
numbers on \(x\)/\(y\) slots respectively. End solution was
|
||||
expressive and elegant.
|
||||
<b
|
||||
>Express the question and reframe the constraints in simple but
|
||||
accurate terms</b
|
||||
>.
|
||||
</li>
|
||||
<li>
|
||||
E: Black-boxed a lazy segment tree (with the help of AI, I must
|
||||
admit—I need to make a template).
|
||||
<blockquote>
|
||||
<i
|
||||
>Everything I did here was wrong and this problem showed an
|
||||
embarrassingly fundamental flaw in my practice strategy.</i
|
||||
>
|
||||
</blockquote>
|
||||
Namely, I should divide up practice time into:
|
||||
<ol>
|
||||
<li>Contests, emphasizing speed and implementation</li>
|
||||
<li>
|
||||
Single problems, emphasizing specific learning objectives
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
In this problem, I immediately saw the application of the lazy
|
||||
segment tree but decided to hold off on it, failing to find the
|
||||
simpler prefix-XOR solution. Therefore, I not only wasted my time,
|
||||
but also cemented in unrealistic practice (I would never do this in
|
||||
a real contest) and worsened my virtual contest performance. As for
|
||||
the prefix-XOR solution, focusing on just one/zero corresponding
|
||||
elements and
|
||||
<b>walking through small examples</b>
|
||||
(i.e. "what happens when \(l=r\)?") would've help me pick up the
|
||||
pattern.
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="https://codeforces.com/contest/2091" target="_blank"
|
||||
>1013 (div. 3)</a
|
||||
|
|
@ -711,55 +729,52 @@
|
|||
<time datetime="2025-03-22">03/22/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
Solved in a coffee shop. Used AI for smaller things (otherwise I'd
|
||||
have no idea).
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
A: Solved a much harder problem related to majority element
|
||||
paths on tree—realized the solution after a minute.
|
||||
</li>
|
||||
<li>
|
||||
B: was confused for about 7 minutes but realized some properties
|
||||
of divisibility and odd numbers.
|
||||
<b
|
||||
>Math is still a weakness. Take simpler approaches to complex
|
||||
constraints, such as considering parity.</b
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
Went off of gut instinct that it is always possible to form the
|
||||
given \(x\) if encompassed in the range of numbers.
|
||||
<b
|
||||
>Failed to prove this mathematical validity but had fair
|
||||
intuition</b
|
||||
>
|
||||
(i.e. just "take off one" if too big/small). This is acceptable,
|
||||
though not perfect.
|
||||
</li>
|
||||
<li>
|
||||
D: cooked. Solved E first and had mentally given up by this
|
||||
point.
|
||||
<b
|
||||
>If you've given up, just stop trying and take a break/do
|
||||
something else. You're wasting your time.</b
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
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—<i
|
||||
>don't be content with an advanced solution when a
|
||||
simpler/elegant idea also suffices</i
|
||||
>.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
Solved in a coffee shop. Used AI for smaller things (otherwise I'd
|
||||
have no idea).
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
A: Solved a much harder problem related to majority element paths
|
||||
on tree—realized the solution after a minute.
|
||||
</li>
|
||||
<li>
|
||||
B: was confused for about 7 minutes but realized some properties
|
||||
of divisibility and odd numbers.
|
||||
<b
|
||||
>Math is still a weakness. Take simpler approaches to complex
|
||||
constraints, such as considering parity.</b
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
Went off of gut instinct that it is always possible to form the
|
||||
given \(x\) if encompassed in the range of numbers.
|
||||
<b
|
||||
>Failed to prove this mathematical validity but had fair
|
||||
intuition</b
|
||||
>
|
||||
(i.e. just "take off one" if too big/small). This is acceptable,
|
||||
though not perfect.
|
||||
</li>
|
||||
<li>
|
||||
D: cooked. Solved E first and had mentally given up by this point.
|
||||
<b
|
||||
>If you've given up, just stop trying and take a break/do
|
||||
something else. You're wasting your time.</b
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
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—<i
|
||||
>don't be content with an advanced solution when a
|
||||
simpler/elegant idea also suffices</i
|
||||
>.
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="https://codeforces.com/contest/1857/" target="_blank"
|
||||
>891 (div. 3)</a
|
||||
|
|
@ -1297,31 +1312,28 @@
|
|||
<time datetime="2025-02-12">02/12/2025</time>
|
||||
</span>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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
|
||||
<a href="https://codeforces.com" target="_blank">CodeForces</a>
|
||||
(account
|
||||
<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"
|
||||
>CP Handbook</a
|
||||
>
|
||||
and browsing by related problem tags with ever-increasing
|
||||
difficulty.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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
|
||||
<a href="https://codeforces.com" target="_blank">CodeForces</a>
|
||||
(account
|
||||
<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"
|
||||
>CP Handbook</a
|
||||
>
|
||||
and browsing by related problem tags with ever-increasing
|
||||
difficulty.
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue