The Journey - Part 1

Hey, so I initially wrote this draft regarding my journey in CP, to be posted by Codechef in one of their blogs, but that never took place. It was a while back that happened, so now I have polished that draft and added some more details to make it more complete. This post has some Q/A at the end which was supposed to be there for that Codechef blog, I will leave the crux of the content untouched since I think it is my honest opinion and might help some people. Although do note the content of this post was written around a year back.

I started CP (Competitive Programming) somewhere around 8-9th grade, with the aid of one of the seniors in my school. I still remember the day when one of my senior (Yash Tewari) told me to first do the first 25 Project Euler questions and only then he would guide me ahead. It took me around a month to get through those first 25 questions. After getting through those first 25 questions, Yash helped me out to learn newer algorithms and data structures. It was a fun experience to be able to get help from and discuss questions with a senior. Later on, he helped me, to move to more proper judges such as Codechef, Codeforces, WCIPEG. He also introduced me to the book of Dr. Steven Halim, Competitive Programming 3. In retrospect, I think he was the only person who truly mentored me and I now realize how much patience he had when dealing with all my silly doubts. And yes, after volunteering and helping out some of my own juniors I can very well say that I have never been as patient with my juniors as he was with me. (RESPECT)

9th grade - I took my first attempt at ZIO and was fortunate enough to be able to clear it but in the INOI, I couldn’t really solve anything and ended with a 10/200 score. I would say this was not a big surprise for me since I did not expect a very good result in the first place because I was not yet good at Dynamic Programming questions or Graph theory questions. On the other hand, Yash did make the cut and went to IOI-TC (RESPECT)

10th grade - I had made good friends with Daksh, Rajat, Anubhav and Aditya (all from DPS-Dwarka) who were also prepping for INOI. We had a facebook messenger thread where we used to discuss a lot of problems and used to regularly participate in inter-school coding competitions as well as online random competitions. I think the internal competition among us was the primary thing that drove us all and made us grow as good competitive programmers. Fortunately, most of us were able to crack INOI this time through in 2015. So, we went to IOI-TC 2015. This IOI-TC was not really a competition for us DPS-Dwarka students (since the top scorers were miles ahead of us), but more of like an eye-opener which made us realize that people at the camp are very good and we need to put in more work for future years, to get into the team of top 4. This was the first time I met the gifted people in the circuit like Malvika, Mriganka, Kushagra, etc (It has been 4 years since that time, and I have forgotten some names).

Lesson - Still a long way to go, since I was nowhere near to crack to the top-4. Secured rank-13 but couldn’t solve any problem completely, so there was a good enough gap between me and the top students.

Do note up-till this point, i.e from 8th to 10th grade I did CP as a hobby. I could devote a lot of time to this since there was no expectation nor reason for me to put a lot of effort in regular academics, so these days were stress-free in general because of chill academics.

11th grade - I would say this was the toughest year for me in school since on one side you have the pressure of normal academics and JEE. Unfortunately, I was enrolled in FIITJEE and during the first half of the 11th was in a bit of middle ground as to whether I should try to prepare for JEE or not. By the middle of 11th I had decided to mostly drop out of my FIITJEE classes and decided that I wasn’t cut out to prepare for JEE, mainly because it required being good in Physics and Chemistry along with Math and also because I found much more joy in practicing on Codeforces or some other judge than solve package modules. I am no way saying that this was a good decision in the long term thought of getting into a college since it could have backfired had I not been able to represent at IOI/not get selected at future IOI-TCs. But yes, this was one of the turning point decisions I made.

(Note - I believe that some students currently in 10th/11th/12th grade might see the thing done above as a kind of motivation to stop preparing for JEE or something. Do realise that this is just my experience where the end results went on to be good despite dropping out of FIITJEE and not taking JEE seriously, I do know people where it did not go ahead the way they wanted, so don’t take this as some kind of advice or anything, it just a narration of an experience not a suggestion of any sort.)

During the IOI-TC 2016, I had a bit of hard luck since I was able to stay in top-4 until the second day of the exam at the camp and was performing reasonably well. But on the third day, I wasn’t able to solve one of the doable questions and lost my spot on the team since my rank slid to rank-7. This year, fortunately, Rajat from our school did make it to the team and ended up securing a Silver Medal at the Olympiad (RESPECT). Also this year Sampriti made it to the top-4 in his first time at INOI as well as IOI-TC, it was pretty inspiring to see him succeed in a single attempt at IOI-TC (RESPECT).

12th grade - I would say that the hardest part for me in the entire journey was to go to the IOI-TC next year knowing fully well, that if luck isn’t on my side this year I will flunk and then I would have practically never been able to represent at IOI despite being at IOI-TC thrice. Just the fear of failing this year was crazy enough to give me the feels what JEE aspirants must face when they write their exam :P This time around at IOI-TC 2017, I got typhoid just before the training camp started. The entire process of diagnosing that I had typhoid and then starting my treatment at home took roughly 3-4 days and therefore I skipped most of the training camp except the last 3 days on which the exam is conducted. I was somewhat better when I landed in Chennai to give the exam for IOI-TC. My parents came along with me for this exam and I stayed with them in a nearby hotel from CMI, since my condition was still fragile. I didn’t really have high hopes since I knew that I was not in my best physical condition. But damn, I hate to brag, but yes magically I did fairly well on day 1 of the exam and ended up being 2nd on the rank-table. Day 1 was enough to boost my self-confidence and make me believe that I can very well maintain my position for the remaining two days and end up in the top 4 finally. And yes, I did end up in top-4. It was one hell of a ride.

Lesson - You need to have a good amount of self-confidence no matter how much prepared/unprepared you are.

After the IOI-TC selection test, I went for a roughly 20 days camp at CMI, to be trained by Rajat. I went there along with Nalin, we didn’t really prep a lot and mostly had good food, but we had a good time.

Do note until this point I had attended a few camps conducted by Codechef which are as follows-

1. Gandhinagar Camp - Immediately before IOI 2017. Best camp I attended during my high school period. Since the teachers were pretty good (Kevin Sogo + Errichto / Kamil Debowski)

2. Snackdown Camp - Attended sometime when I was in 11th grade, conducted by Codechef, teachers mainly were (Arjun Arul + Kevin Sogo). Quite math based content and since I was still in 11th grade and not really an ICPC candidate, therefore I found most of the content not that much relevant to IOI-TC/IOI. But overall good high-quality camp.

3. Amrita Camp - Attended sometime when I was in 10th grade. Okayish in terms of quality. The accommodation was not that good, however, we were taught by quite good Indian college students (Arjun Arul + Surya Kiran + Ajay Krishna).

(Note - By this time I had attended some inter-school coding competitions, college coding competitions, SEARCC, Codechef Snackdown, etc. But all these competitions were just good competitions to practice at. They were never the goal themselves so I won’t be covering their experiences here. Obviously, I think all these competitions are quite good, it is just that I never really prepared separately for them.)

Cracking to the team for India more or less generally means that you are good enough/have a quite high probability to secure bronze at the IOI. After coming from the 20-day thing at CMI, we went to IOI-2017. It was a good event and I had a good performance on day 1, but a bad one on day 2. I ended up securing a bronze medal with a rank of somewhere around 87th. Although the second day did not go as I expected since I couldn’t get partials on the 2nd and 3rd problem, but still I was more or less content with my performance. Being at IOI you get to meet truly gifted students. One of the closest encounters, for me, would be Srijon. Since the IOI-TC is only 8 days long with 20 students, so you don’t really spend enough time interacting with all the students. It was during the IOI that I interacted with him my first time and boy I envy that he is so smart. I think IOI is a good reference point in making almost anyone realize that you can never be good enough and that someone is always there better than you. I think going to IOI made me a humbler person in general.

Now an interesting turn of events took place. Initially, after IOI-TC 2017, I had given an interview at IIIT-H and got admission into the 5year course through Olympiad quota. I won’t explain the exact details of the process here, you can google it up if you want. I had also applied to NUS during the summer but received a rejection somewhere around June/July. The Olympiad itself was in August, and there Dr. Steven Halim, the coach of Singapore contingent (and faculty at NUS, and author of Competitive Programming 3) met me after the results were out and by sheer magic got my decision for NUS flipped to an acceptance. Damn, I was lucky. Perhaps the luckiest I have ever been. Since the session had already started at NUS, so I had to decide on whether to go or not within a short span of 3-4 days. After some discussion, me and my parents ended up deciding to opt for NUS over IIIT-H, primarily because we thought that the education and the opportunities I will be able to get at NUS would be more as compared to IIIT-H. Now, after being at NUS for roughly 2 years, I can say, we took the correct call and I was damn lucky to have interacted with Dr. Halim and will always be thankful to him :)

Conclusion - Although competitive programming stands for doing programming as a sport and competitively but it was at IOI-TC and IOI that I understood that a part of competitive programming was about appreciating what others have achieved in terms of skills through their hard work, intellect, and passion. At places like these you get to meet smart people, really smart people and if you simply envy them for what they are, you will probably end up being salty, enraged and pissed of. It would be much wiser to just genuinely appreciate them. The journey of high school CP ended here for me, I was more or less content with the eventual results. One bronze medal as a witness to 4 years of hard work from 9th grade to 12th grade. Not a bad deal, I would say. Although the next part of it is still due. Since now preparing for a completely different ball game (aka ACM-ICPC) started when I entered NUS. This blog post would become a pain to read if I included that also, so I will just make another blog post after the end of this semester titled, The Journey - Part 2 for that.

(Note - In the entire blog post I didn’t really cover any technical things as to where did I used to practice, what were the portions in CP I was strong/weak at. I did not do this mainly because I am still evolving and do not have a concise answer. One of the things I can say right off the bat is that for practice I have mainly done Codeforce, Codechef, WCIPEG, Past IOI-TC questions, up-till my 12th grade)


FAQs -

Take all the suggestions below with a pinch of salt, since neither I am the best person to advise nor should you put faith in a guy whom you came across online :)

Q) Is DPS Dwarka a good place for someone interested in CP?

A) I do not endorse my school in the above post and I think that the faculty and principal were not particularly helpful/supportive to students who did CP. The main benefit I had in my school, was the presence of the Computers Club (C.O.R.E) where we were able to interact with other students interested in the same field and the fact that we are able to participate in the Delhi based inter-school programming events. But apart from that my school hasn’t yet started recognizing students (supporting them in terms of leave of absence for preparation for the Olympiad/funding travel for inter-school events which are in other states) pursuing Olympiad preparation despite having more than 6 - 7 IOI-TC students and 2 medallists. I still believe it is a good school if one wants to prepare and excel in Boards / JEE, but I have found that a lot of students doing CP have this illusion that DPS Dwarka has some classes or something to train students in CP, since we had a good trend of IOI-TC students in the past 2 - 3 years. So I am clarifying what I think about my school so that someone making the decision to come to DPS Dwarka for this very purpose makes a more aware decision.

Q) Do I have any suggestions for people who wish to improve in CP(Originally written for the Codechef blog)?

A)

  1. Spending time thinking about problems is MORE VALUABLE than coding out the solutions.
  2. A good strong mathematical background helps a LOT. (Example - Proficiency in permutation and combination, Induction, Probability, etc.)
  3. In India, we sometimes focus a lot on data structure as compared to the reduction portion/problem-solving in our problems. I would suggest students give more weight to the problem-solving aspect as compared to strengthening their data structures. Since I believe that in the final rounds of IOI - TC / IOI the trend is that they generally don’t test advanced data structures as frequently as strong problem-solving skills. For this, if you are free you might even go to the extent of practicing for RMO/INMO in case you think that helps.
  4. I think proving your solution/algorithm is underrated in CP. Going by your intuition for a given question is a good strategy in a contest time, but during practice, I believe that trying to prove your approach is essential. It strengthens the concept and will hopefully help to crack a harder problem in the future because of the insights gained during the attempt of proving.
  5. If you are Delhi / Kolkata / …., region then you can find a good number of inter-school programming competitions happening around your locality. I would suggest people be involved in these events to gauge how they perform in pressure and against their peers. Still don’t consider these events as the best metric for your performance, since sometimes inter-school programming events don’t have good quality problems.
  6. Make a group of good close friends with whom you can discuss problems at lengths. I have found this method very productive for my growth since it helps to know about interesting problems which my friends find. Also when you discuss, the discussion is not about the code it is about finding the approach and why is it correct. This discussion is often much more valuable than practicing more problems in my opinion.
  7. Start early. I think that starting something like CP during your 10-11th grade can sometimes be hard on the student. Because he/she might face the dilemma of splitting their time for Academics (PCM / JEE / Boards) and CP. Starting out in 8-9th grade gave me an edge over others, because of 2 reasons. Firstly, experience. I gained a lot of experience in onsite contests because I have appeared in so many. Secondly, strengthening of the concept. When you read about a certain concept on blogs/editorials, the time it takes to digest it can vary from person to person. But if you start out early, you are not on a clock to do stuff hurriedly, you can take a lot of time for things you find difficult
  8. Please don’t make fake accounts. In India, amongst the school level CP student groups, since the last 2 - 3 years there has been a trend of students making fake accounts for practicing on online judges. Example - Let us say that I make an account named “ xyz” on Codechef and start doing problems from this account now. People do this because of the competitive environment. The reason behind doing this is so that others do not get to know what problems they are doing. But I think it is morally incorrect if one person has a fake account and another doesn’t. Why? Label the person using the fake account as A and the one with a normal account as B. Here A has the advantage to see what B is doing in practice, but B is deprived of this. Secondly, during live contests as well A can see how B performs but B is unaware if A participated or not. This is a typical example of a prisoner dilemma. Also, if all the students make up their mind to use fake accounts, then another problem comes up which is that then technically no one knows what other people are doing. In a case like this, let us say that A becomes a good CP competitor and now his juniors look at his account to see what kind of problems should they attempt or practice. They would not have a clue as to what to do since from his original account A would not have made any submissions. This basically takes us a step back in making the CP community good in our locality/country. I have seen people doing this first-hand and I personally hate this practice and think it is quite unethical.

Q) Has doing CP helped you in your career/academic pursuits (Originally written for the Codechef blog)?

A) Yes, I think CP has helped me a lot in my career/academic pursuits. As for academics, I think it improved my problem-solving skill in math. And now being in college, I am not hesitant in taking good algorithms related courses, in fact, it is going to end up being my specialization area in my undergrad. Apart from that, it helped me get into a college since I did not really prepare for JEE nor did I have a strong profile for abroad US universities. One thing I would like to mention however is, that if you want to CP then do it for the fun, do it for the glory, do it for the prestige of IOI. Yes, it will help you in college admissions in India (CMI and IIIT-H recognize it up to a certain extent) and abroad, but if that is your sole aim, then I don’t think you would have a strong enough drive to actually crack through the entire process. Because you will fail somewhere when you have 4 rounds of screening, ZIO / ZCO then INOI, then IOITC and finally IOI. I believe that the motivation rooting from the passion for the subject and from the prestige of IOI is far greater than the (greed/fear) of (getting/not getting) into a good (Indian/abroad) university. I think the most prominent example following this would be Rajat. One of the best things about his work ethic was that he did the Olympiad because of the love/obsession he had towards problem-solving. If you have ever interacted with him, you will realize how little did it matter to him about how doing CP would be a profit/loss statement for him in terms of career/academic prospects. So I would conclude, that yes it does help you in your academic pursuits, but see it as a byproduct of doing the hard work and not as the goal. Because if seen as the goal, then I believe we will slowly transform the Olympiad into a JEE of some kind, where people do it to get into a good college. And frankly, I think one JEE exam in India is enough, we don’t need another.

Written on February 9, 2019