## Blog entries – codeforces la gasolina reggaeton explosion

When I started my years at school (age 5-6), I was different from other kids: I do weird stuff like remembering phone numbers and math.. On top of that, I was the smallest kid in the class. So obviously I became target for bullies. I still remember how it sucked being bullied and how it sucked more when I heard teacher told my mom about my bully: "Look at that sweet little girl, how can she be a bully?"

When I was in 2nd grade (Vietnamese edu system has 12 grades), a magical thing happened: I got highest score in my class. Suddenly the bullying stopped. I realized that when you are #1 and became teacher’s favorite, you would not be bullied anymore. So I decided that I would always be #1 in my class.. That happened for few years until they introduced us with History and Geography.

Then when I was in 8th grade, the school needed some good student to participate in the City Olympiad in Informatics. m gasbuddy So we were taught how to code in Pascal. I was enlightened: "Wow I can make the computer run programs, and do stuff with input and output magical things like ASCII arts :-O". Thus I started coding all day and entered City Olympiad in Informatics and won some prize. Highschool & National Olympiad

On the 1st day of the IOI team selection contest, I quickly read the 1st problem and found that it is a very simple Dijkstra problem. I started coding immediately (later the guy sat next to me wrote online "Crap, today I sat next to some crazy guy who started coding so fast and loud immediately after the contest start and I was so scared."). After I finished coding, of course it did not produce correct output for given sample. gas mask bong nfl I draw the graph on paper and still had no idea how it can produce such output. Some guy in the contest hall asked the contest supervisor if the path can revisit the starting vertex and target vertex. The contest supervisor did not know. I was like WTF, but I realized that if I do that for the starting vertex then I can produce correct output. But I have no idea what to do with the target vertex. So it was like a 50% gamble. The other 2 problems were quite easy and had nothing special. 1 unit electricity cost in india After the contest I asked other contestants and it looks like amongst the 30 contestants I was the only guy who did not allow revisiting target vertex. F*ck.

So on 2nd day I was very scared and the 3 problems were much more difficult. I managed to solve 1st problem after 1 hour. I read both the other 2 problems, and found 3rd task impossible. So I spent all 4 hours coding 2nd task. It was very complicated task so I had bugs everywhere. After contest I asked other contestants and everyone solved 3rd tasks (after some reduction it became a simple problem with DFS tree) and no one solved 2nd task.

It started with the National Olympiad. I finished the first 2 problems quickly and had lots of time for 3 problem. I thought long and hard about that digit DP problem and found that it was very strange. If you read Vietnamese, it is this problem. I could not solve it, and later found that there was 9 people who solved it correctly and had perfect score. I was already scared and then I realized that I had integer overflow on my 2nd problem.

On the 1st day of the contest, there were 3 easy problems. q card gas station The 2nd problem had number of operation around 10 9 and it ran in around 5s, so I spent lots of time optimizing it (note that we did not know time limit). Later I found that they set time limit for 2nd problem to 10s, so no one got TLE. But for 1st problem they set time limit to something like 0.5s and everyone got TLE except for 1 or 2 guys who used heap instead of segment tree: time complexity is the same but constant factor is a little bit smaller.

On the 2nd day of the contest, I thought that since everyone had almost same score on 1st day, so I must try to solve 1 more problem than the others. Then I thought I was lucky when I read 1st problem of 2nd day: it was similar to a problem on VOJ that only I solved before. (For Vietnamese readers, it is this one ). I knew that in this problem it was a DAG instead of a tree and the cost function is max instead of sum, but I thought that I should be able to modify my old algorithm to work for this problem. Then almost 3.5 hours passed and I could not produce any working algorithm. I was so scared and I read other 2 problems, 2nd problem looked impossible and 3rd problem looked like a straight-forward but complicated one, so I started implementing it. electricity outage chicago I finished it in time but did not have time to test it (and of course there is no feedback during contests). I believed I made lots of bugs.. After contests I found that no one solved problems 1 and 2. Everyone solved 3rd problem, some wrote solutions for small cases of 2nd problem. No one touched 1st problem.

The following year I went to ICPC WF with my best friend ConanKudo, despite me making a bug in the regional when declaring array: I thought 20 * 30 = 60, so my arrays was obviously too small. In WF I was so scared of making stupid bugs and wrong algorithms again. Of course in ACM ICPC WF I made lots of stupid bugs, including: misunderstood the problem statement, integer overflow, implemented O(2 N * N 2) instead of O(2 N * N) and got TLE, made wrong optimizations and got more WA. electricity nightcore All of that for the easiest problem in the contest. You can see how many WAs I made for problem C here: WF 2012 scoreboard. Look at the top 20 and you can immediately see the guy who had +7. My teammates also performed badly and we only managed to solve 3 easy problems (B, C, D) after 3 hours of the contest. I felt so desperate almost cried. We went to WF hoping for medal and this is what I did.

Magically ConanKudo was able to calm me down and some magic happened so we were able to solve 3 more problems in the next 1.5 hours. "OMG maybe if we solve 1 more problem we can even get medal". But of course we did not have enough time for the implementation problem I and we only have some idea for problem A. We decided to code A anyway, filling what we could not solve with some stupid randomization and local search. Of course we did not solve it.

I could not stand it. For several months I felt like hell. k gas oroville I tried not letting my emotion affect my life but some time even I realized that I was acting like a crazy psycho. That year I went to ACM regional with another friend technolt. Of course I failed regional again. And with my crazy behavior I wrecked my friendship with technolt and several other people too. I felt like I had no friend again. For a long time I woke up at 1pm or 2pm, went like a zombie to have lunch, went back home, do mostly nothing, had dinner, went back, do mostly nothing until like 4am.

I started dating Hoang Yen in early 2013 and it was a turning point in my life. But every time I logged in to CF it reminded me of all my failures, so some time in mid 2013 I decided that I hated my original account R_R_ so much that I created this account. (I know it was very wrong to have 2 accounts, and still use it sometimes, so I always feel very bad about it.). Last ACM

I trained for 2 years with flashmt with the help of the current best Vietnamese competitive programmer RR_PPAP. It made me felt in love with contests again. Of course we did not win an ACM ICPC WF Medal but I felt that it was OK. Those 2 years training taught me lots of things, including dealing with failures. I realized that our trainings were more fun and more meaningful than the medal itself.

I’ve chosen flashmt as teammates for several years, but were not able to choose any third member. Since I only want to select Vietnamese, we have only few good options ( darknstd, infrmtcs — both IOI silver medalist). After the WF 2015, I read this comment by fhlasek about the story of his team, and decided to pick an IMO guy instead. Thus, I picked nguyenhungtam who was IMO medalist but has very few experience with programming / algorithm and I trained him from that. It was a good choice, I had a lot of fun watching/trying to understand problem solving from Math people perspective, and we did much better with better mathematical imagination. Regionals

Our strategy is flashmt will code mostly all problems while nguyenhungtam and I solve all the problems on paper. This is mainly because I usually fail to code simple things in important competitions (anw during this WF I implemented B & K, both had 1 wrong submission, but I think it is ok considering my current standard). And we also believe that the WF problemset requires more thinking, so 2/3 team time thinking is good.

I think the easier problems are ok, but maybe too many of them (8 easy problems..). I liked K. electricity quiz ks2 The judge solution for B is nice, but I think they are not very familiar with Divide & conquer DP optimization, thus this problem became copy-paste divide & conquer DP from our notebook. (I publicized our notebook here — you can use it at your own risk)

There were 5 hard problems F H I J M. I think H I J are too hard, M is hard to implement, so my team only had one choice of solving F: either we solve F and get medal or we don’t solve F and don’t get medal. I think the choice is very limited this year. Maybe if there was 1 medium problem instead of easy problem, there would be some choice for teams after solving easy problems.