`

Code Jam 2017

Posted: 9 April 2017

It’s Code Jam season once again! It’s fun, and it trains my programming skills and thinking as well. I started too late this time round. I started at 10pm, wanting to just qualify. Finished the first 2 problems within an hour, but made a mistake and B Large TLE-ed. That meant I had to do C. I was super fixated on a binary search initially. I tried to build a tree data structure and all. It took me awhile to build it, didn’t revise it before hand. After constructing it, I thought I was done, but it couldn’t solve the 2nd small dataset in time. After analyzing this in greater detail, I realized my stupidity. You don’t need a search! It can be computed with math. It’s a pity I didn’t realize this earlier. I ended up finishing this at 9:30am, half an hour before qualifications close. I’m pretty sure I nailed it because both small sets were marked correct.

I didn’t sleep the whole night for this, short of some errands I had to run in the middle of the night at 3am, because Dad was not feeling well. And then I went for a McDonald’s breakfast run :P

Coding while tired is really not ideal. Should start earlier! I tried the entire Round 1 last year, but couldn’t qualify for Top 3000. Always got stuck at Question C. I have a feeling I won’t make Top 3000 this year. I will aim to reach Top 1000 next year and get my t-shirt.