I have really been wanting to do a tutorials of the latest contests on CodeForces.com but really haven’t had the time to do write ups like I would like. So I had the idea to just record everything and upload it to YouTube. So I broke the video into three parts, one section for each problem I was able to solve.
So I hope you enjoy!
Problem A – Vanya and Fence
This was a very easy problem. I spend a few moments showing off CodeForces in the video as well.
Problem B – Vanya and Food Processor
This video went on way to long. This was the problem I was able to create a hack that allowed me to get an bonus 500 points from hacking. Which is awesome. The only thing was I changed the long to an int half way through the contest. Which cost me a resubmission later on and over 300 points. Very frustrated about that.
Take a look how I would solve this problem now!
Problem C – Vanya and Label
This was the last problem I was able to solve. I had a block and knew it was a combination problem. However, I couldn’t figure out how to do it. I knew there may be a math formula, which was covered in the official tutorial, but I used a frequency array. But I thought it would take to long, so I created program that generated the values for me, and I copied and pasted it into my program.
That was great, but after thinking about it I could have just pre-computed it and stored things in an array. That is how I show you how to do it here:
Well, that is it! Hopefully I will do more of these. If you found this helpful, please message me on C4Cheats, or leave a comment on one of the videos!
Thank for watching!