NAQ 2023
Today, we did the ICPC North America Qualifier contest. It served as a in-school contest I would say.
We only have two members for this contest, my other teammate was at GHC so she couldn’t do the contest.
It was quite a stressful contest, especially we only have 2 people, but we still AK’d the contest and got 3rd place.

We could’ve gotten 2nd place honestly, but FlamingLions solved the last problem right before the contest ended, and our penalty was too high so we got 3rd.
As soon as the contest started, my teammate chose to tackle pK, a graph problem (which is also the hardest problem in the contest), while I started to categorize problems while solving easy ones in the meantime.
I solved A, F, L, G, H fairly quickly, and my teammate solved pK, getting the first kill on it.
Now we started to get a little bit stuck, as we didn’t know which problem should be approached first.
I went to do I, and got WA 2 times after implementing for a long time (I missed an edge case :/), then I went to try out C, which is a pretty intuitive binary search problem, but also got weird WAs, which really made me triggered.
Luckily, my teammate was hard carrying, and he not only solved C and I after me explaining my ideas to him (apparently my ideas were all correct, but there was small implementation details that I may oversighted not sure), but also solved B and D.
Now we only had E and J left, and I think around here the 1st place AK’d the contest (they solved everything really quickly, but it took them nearly two hours to solve pK where my teammate solved around the first hour)
We initially thought E was a flow problem, but it was actually just a joke problem and we solved it quickly.
In the meantime, I noticed that J has an interesting constraint: , which means that I can just compute the prefix and suffix, save it in a map and do queries with that!
Well ofc, the problem wasn’t that easy, so I got MLE. We then came up with double hashing the pre/suffix, but we keep geting WA. Suddenly, my third teammate asked me whats the situation now, I explained that we are on the last problem but keep getting WA. She checked it out and suggested we do double hashing with mod to prevent collision, and suprisingly, it worked!
I think there is definitely a good chance we can get first place if the third teammate was here. I was basically useless apart from giving some intuitions after the 3rd hour, because i’m just not strong enough to do the problems quickly and error-free.
I think there definitely is a chance for us to qualify NAC if we get lucky and try hard enough…
Good luck to future me and grind more to become stronger!
