12:28 AM
I finally stopped procrastinating on upsolving IOI18 day 1 p2 today.. lol
The implementation of this problem was some 2d grid swap updates that update a segtree... overall just a massive pain to deal with
I started writing up (for specifically subtask 5, which enforced that the grid was a line) my solution this morning, building off of the stuff I had from the virtual. Then I kinda got distracted with some cses problems and picked back up a few hours later. This was a pretty big mistake because I ended up fighting against WA for at least 45 minutes because I forgot what one of my arrays did :skull:
Then after I got AC on 1d case, I adapted for 2d.. which should've been easy, right?
Nope :clown:
First I got TLE on some tc that previously passed, which was because my weird segtree update was log^2. I rewrote that, but still got WA on almost all test cases with the notable exception of subtask 5. (1d case)
In retrospect, that kinda gave away the problem at hand, but for some reason I instead spent collectively another hour or so (got distracted with more cses lmao) reading through my code because I thought I had implemented something wrong...
The issue ended up being a specific case in full 2d that I wasn't handling
properly. Obviously, this explained why subtask 5 repeatedly passed, but I was
kind of sleep deprived stupid. After adding in that case, my code got AC
without any further modifications ._.
So, I definitely need to work on implementation.. lmao
tags: programming ioi