Ten years of competitive programming 3

Revision en5, by Arpa, 2023-11-20 10:11:34

Hey Codeforces!

I’m AmirReza PourAkhavan, the former Codeforces Contest Coordinator. I let the story become complete and I’m sharing it now.

The story is about a 16-year competitive programmer, who left his family and migrated to another city alone to follow competitive programming. After seven years, he advanced to the International Collegiate Programming Contest World Finals, twice.

Read the previous post here.

Read the Persian version here.

What happened previously

I was a lone programmer, in a small city, trying to learn CP and prepare for the Iran national olympiad. It was not as successful as I expected. I tried to change my school and I migrated to Tehran, alone. I entered AE high school to learn from its inspiring teachers.

11th grade

First day of school. I got to know my classmates: Yara Kamkar (yarak) and Michael Nematollahi (Deemo). As I mentioned before, AE is one of the few schools in Iran that have olympiads department. The olympiads department has its own manager and weekly program. Our weekly program consists of two free days, two days of normal lessons (Math, Physics, …), and three days of classes especially for the olympiad. For example, for the Informatics olympiad, we had combinatorics, graphs, algorithms, and coding classes.

Here is a suitable place to mention my teachers at AE high school:

  • Mojtaba FayazBakhsh (moji): INOI (Iran National Olympiad of Informatics) gold #1 and IOI silver. He was and currently is my inspirational life mentor.
  • Mahdi Shokri (M.Mahdi): INOI gold #1 and APIO gold. ICPC bronze medalist.
  • Amin Bahjati (Lost): INOI gold, INOM (math olympiad) gold, IMO silver #1.
  • Ali Bahjati (LiTi): INOI gold (two times), IOI gold (two times).
  • Abolfazl Asadi: INOI silver. Somehow the godfather of theory in INOI.
  • AmirMohammad Dehghan (PrinceOfPersia): INOI gold #2 and IOI silver.
  • Ali Haghani (Haghani): INOI gold #1 and IOI gold #6.
  • Seyed Ali Tabatabaee: INOI gold #2.
  • Arash BeikMohammadi.

By gold #x I mean the x-th place between gold medalists. They were great teachers. Maybe the best collection gathered for any competitive programming class in history. On the first day of our coding class, I managed to solve a nice geometry problem, while no one else managed. Great start! But things were not like that.

Where I lived



Fallah neighborhood

I was living in a small house. With a kitchen but no room. It was more than enough for me as a single student. The house was located in the Fallah neighborhood. With respect to cultured, warm-hearted, and likable people living there, Fallah is known for street fighting, addiction, and extortion.

For me, as a sixteen-year-old boy, living in this neighborhood was somewhat difficult. While living in that neighborhood, I witnessed some scary things. These may be normal for the people of the world. But for me, who had lived in Yazd — one of the safest cities in Iran — these were very unusual and scary. To better understand the environment in which I grew up, I can say that I have never heard of extortion in Yazd.

During my stay in that neighborhood, I once witnessed a street fight. Two groups of several people attacked each other and one stabbed the other and both groups ran away. Another day, while I was waiting for the bus, a passing drug addict fell right in the middle of the street. People came to help and brought him to the side of the street. Another time, I arrived in Tehran by train from Yazd in the very early morning. I took the subway to the station near home. There was about an hour left until sunset. Someone followed me from the subway to my house. That 15 minute was the scariest 15 minutes of my life.

To get to school, I used to leave home around 6:20 in the morning. I would take a bus to a station and then take another bus. Then a twenty-minute walk takes me to school. I usually reached the school around 8 o'clock. I always had questions in my mind that I solved on the bus. Usually programming problems and sometimes a theory. Sometimes I fall asleep while thinking about the problem.

At school

It wasn't long before I realized that I knew even less than 10th-grade students. For example, I didn't know about LCA and they did. After entering the school, I experienced a sharp drop in my rating so I was below 1600 for a long time. My performance was bad in classes and I felt a serious difference from my classmates. Sometimes Yara (one of my classmates) helped me learn a subject.

The classroom atmosphere was cold. On the one hand, the number of classmates was small, on the other hand, a cold war started between Michael and me. I hardly remember some details. The whole story was that, in my opinion, Michael was very arrogant, and this arrogance hurts me. Yes, I was much weaker, but this couldn’t be used as a reason for him to ignore me. I miss this amount of ignoring. This cold war lasted until the end of school, and even after that, it didn't get much better. I was sometimes teased not only by my two classmates but also by the teachers for being weaker.

From the day I entered the new school, I studied the Olympiad seriously. According to the official statistics of our Olympiad manager, I broke the high school record for the most hours of study per day, week, month, and year. One day I was coding for seventeen hours and forty minutes from midnight to the wee hours of the next day (something like twenty-six hours). I remember that there was doubt among the counselors of the school if this number of study hours is real. The manager of the Olympiad replied: "Yes; He [Amirreza Purakhan] is like a rocket." It's a shame that I don't use this opportunity and ignore the efforts that the Olympiad manager — dear Mr. Ali Shahsavari — made for me. It is a source of happiness that I am still in contact with him.



Ali Shahsavari

Many nights I would code until around 1-2 AM and wake up again at six to go to school. The night before holidays, I sometimes slept early. I would wake up around four in the morning and start coding. One of my interests was to see the friends' status page on Codeforce. I used to enjoy when I would wake up early and get some accepts and then see that the others had started working.

All these efforts, however; gave fewer results. My performance in classes was not good. I didn't do well in Codeforces contests either. Although, I did not do so badly on the school tests. The graph class was very bad. I could hardly solve a question in class. In classes, we used to solve Div.1 E questions, but sometimes I couldn't even solve Div.2 B in contests.

About three months of the school year had passed. Abolfazl Asadi — the head of the computer department — held a meeting with each of us separately to discuss our situation. Mr. Asadi's words in that meeting were realistic. To some extent, it was understood from his words that he is disappointed with me. After that conversation, there was no particular change in me; Neither positive nor negative.



Abolfazl Asadi

First semester exams came. During this period, Olympiad classes were interrupted for about a month. I didn't pay attention to the semester exams and focused on coding. Sometimes I would sleep at 9 o'clock at night and wake up at 3 o'clock in the morning and start coding. I coded day and night. In just one period of four months, I accepted ~800 problems in Codeforces. I used to participate in many virtual contests and after that, I would solve the questions that I was not able to solve in the contest. Some days I participated in five virtual contests.

From the beginning of the second semester, I felt a slope in the programming classes. But in Codeforces, the situation didn’t change.

It finally led to a result

On February 4, 2016, I ruined another contest and became a Specialist again. Three days later, in round #342, I ranked 18 on Div.2 and got +229. I also broke my rating record.

Wow! Coder Arpa competed in Codeforces Round #342 (Div. 2) and gained +229 rating points taking place 18

Less than twenty days later, I reached Div.1. I passed 1900 and wore purple. Two days later, I took part in a contest again and gained a positive rating again.

The morning after that contest, when I went to school, the schoolmates' behavior changed. I was looking like a new person. I was floating on air. Finally, my efforts were paying off. My growing trend continued in the classes. In the graph class, however, I still did not have a good situation. The graph teacher suggested that I should show up in the 10th-grade class.

The beginning of the second semester was accompanied by several changes in the weekly schedule. Seyyed Ali Tabatabai gave his place to Mojtaba Fayazbakhsh. The first day I saw him, I did not have a positive opinion. Earlier, when I was in Yazd, he had a class with us for a few days in Yazd Nowruz camp. Nowruz is the Persian new year holiday. These classes were not interesting to me. Especially that after he described the solution to a problem, he asked me to come to the whiteboard and explain and I couldn't! He also emphasized that he has studied a lot on the way to his success. My impression was that he is a person of ordinary talent who got succeeded by studying too much. This was not desirable in my opinion.



Mojtaba FayazBakhsh

His classes were different from other teachers. He used to talk about unordinary topics in his classes: limits, probabilities, physics, and even the problem of determinism and free will! Things that maybe had nothing to do with the Olympiad. After each class, I and Mr. Fayazbakhsh both used to go to the subway from school. It was about half an hour. We had different conversations on the route. Sometimes we didn't finish talking on the route and we continued in the subway for a while. I was never that close to a teacher. It didn't take more than a few weeks for me to realize that the opinion I had of him was wrong. I really liked his character. In that teenage mood, I felt him as a mentor, somehow. I remember he asked me for feedback once on the route. I respectfully suggested that there is a lot of irrelevant discussion in the class and I prefer the class to focus on the Olympiad. Of course, I also gave positive feedback, but I don't remember.

The same growing trend continued until Nowruz. I stabilized my rating. I was completely confident in the Nowruz camp. All in all, I was the best in the class during the few weeks of classes held after Nowruz until the second stage — late April. That is, I solved more questions than others. Five days before the second stage, Mr. Asadi had important talks with me. Part of what he said was that if you progress with the same slope from the time between stage two and stage three, I strongly predict you will win a gold medal. I saw gold before my eyes. I was tasting success.

During these seven months that I lived alone, I traveled to Yazd two or three times. Usually, my mother or father came to Tehran every few weeks. They would prepare some basic ingredients for food and stay for a day or two and return. Mornings, usually minutes before leaving the house, I would spread cocoa on bread and make breakfast. The school served lunch. The remaining: launch for two days and at dinners. I usually cook rice. Along with rice, I sometimes heated frozen stew. Sometimes I fried chicken. Sometimes the landlord brings me food. Many nights, before going to bed, I remember that I haven't eaten dinner. There were different options on the table! Some nights I ate rice and tomato paste! That was interesting. Some mornings, I just remembered that I don’t have bread in the house. The natural result was to starve.

While cooking, I would solve questions and even participate in virtual contests. Result? Burning food. The rice I cooked usually came out dry. Because every time I made rice, I poured so much rice into the pot that it overflowed while cooking. To summarize, these were all peripherals and the main goal was the big goal I had aimed for. I was born to win gold and now I just needed to wait a little longer to achieve this goal.

A few days before the second stage, my family came to Tehran to spend the remaining days together. I should rest and prepare for the exam. In these few days, after months, I ate good food! I ate good food at lunch and dinner and enjoyed being with my family. Of course, despite the teachers' advice, I didn't stop coding even the day before the exam.

To be continued...

Update: Read the next part here.

Tags giveup, story

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English Arpa 2023-11-20 10:11:34 80
en4 English Arpa 2023-03-26 14:14:57 18 Tiny change: ' exam.\n\n' -> ' exam.\n\nTo be continued...'
en3 English Arpa 2023-03-26 05:46:45 51
en2 English Arpa 2023-03-26 05:44:01 173 Tiny change: 'an version [here]**(https://d' -> 'an version** [**here**](https://d'
en1 English Arpa 2023-03-26 05:42:12 13266 Initial revision (published)