Arpa's blog

By Arpa, history, 4 days ago, In English

Hey Codeforces!

I’m AmirReza PourAkhavan, 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.

Why I’m writing this

Six years ago someone asked me here to write my story. I think it can help you to never give up.

A brief about me

I've been doing competitive programming for ten years. I advanced to ICPC (International Collegiate Programming Contests) World Finals twice, in 2019 at Porto and 2020 at Moscow. At ICPC World Finals 2020, our team took high-honored place twenty-four, which is equal to the top 0.03% of 200k students participating in ICPC.



I am presenting in the ICPC World finals Porto, 2019: CP-connect, A problem recommender.


I am presenting in the ICPC World finals, Moscow 2020: Let the students grow (on successful teaching).

I was a tester, problem setter, editorialist, and contest coordinator at Codeforces, Topcoder, CodeChef, and HackerEarth, for five years. Also, I am (was) a judge at Africa and Arab Collegiate Programming Contest (super regional competition for ~70 countries) 2021, 2022, and European Girls Olympiad of Informatics (girls version of IOI) 2022.

I’ve solved ~3.7k problems on Codeforces, and ~5k problems overall. I have been teaching Algorithms, Data Structures, and competitive programming for ICPC and IOI for six years. I’m also a software engineer and algorithm designer at a company.

How I started the competitive programming

I was 13 years old when I learned QBasic – a simple programming language. In 7th and 8th grade, I learned QBasic and VB at school. We had a competition in our middle school called B.M.M. (Best Programmer in School) (Yes it should be BPS, but it’s Persian). I took second place and it was a sad thing for me that I lost the competition to my friend and my competitor ATofighi.

In the 8th grade, we made a team and competed in the HelliNet Programming Contest which is the most known high-schooler competition in Iran. We took almost the last place. All participants received a simple big cup with the HelliNet logo. It was nice for me.

9th grade

In the early 9th grade (Sep 2013), I became familiar with real competitive programming. I went to the olympiad. By olympiad, I mean the Iran National Olympiad of Informatics (INOI) specifically; and generally, the International Olympiad of Informatics.

I used to live in Yazd. Yazd is a city with ~500k population in Iran. As you may know, Tehran is the capital of Iran. Yazd is 700 km far from Tehran. Finding an olympiad teacher in Yazd was (and currently is) almost impossible. On the other hand, there were (and currently are) many professional olympiad teachers in Tehran. I was aware that I needed to pass the path alone.

A teacher (Seyed Hamed Sadat Hosseini) taught me C++ in the summer before 9th grade. He was my first teacher. I still meet him sometimes and I thank him for all his effort to help me start the path. I started learning Combinatorics, Graphs, and at the same time, Algorithms, Data Structures, and coding. I felt that I love competitive programming and the olympiad.

We were several olympiad-lover students, trying without a guide. We were going nowhere. Solving random problems on Codeforces and gaining and losing ratings at random. We had a teacher or two who held limited classes for us. I participated in classes, but most of my growth was on my own.

I didn’t participate in many regular school classes. Instead, I studied for the olympiad. Let me describe how the olympiad works in Iran.

How INOI works

Students can participate in INOI two times: in the 10th grade and 11th grade. Each year, a season of INOI runs. Each season starts in about February and ends in September. It contains several stages. In the past 9th grade students could participate in the first two stages just to become familiar.

In the first stage, about 10k students participate and 1000 students pass. Then in the second stage, this number reduces to 80. These two stages are theoretical (combinatorics, graphs). Then we have a third stage, which is coding.

The forty students passing the third stage enter the summer camp. They review their knowledge and at last, they take several exams and they win medals. Gold medalists will be free to choose every major and every university to study in without participating in any exam and for free. Other students need to participate in an exam called Konkoor to get into university.

Silver and Bronze medallists have a huge bonus when participating in Konkoor. E.g. if a medalist took place 5000, it’s like that he took place 1000. Note that all of the expenses of students studying in top universities (top ~100k students) in Iran are covered by the government.

Let's get back to the story. Studying for the olympiad instead of Konkoor is a risk. Why? Because if someone fails in the olympiad, he’ll have just one year (12th grade) to get prepared for Konkoor, while others try for 3, or 4 years. I was taking a risk. In February 2014, I participated in the first stage of INOI and passed with a high grade. It was a good start. I was very happy. You can see that my rating was purple at that time. Again, I and Alireza (ATofighi) participated in HelliNet. We took place ~15. I got my first T-shirt in that competition.

I experienced a high rating loss at the end of the 9th grade. At that time I didn’t know any algorithm/data structure. I knew combinatorics (counting, simple induction, ...) and was able to solve simple graph theory problems. I started 10th grade with a rating of 1057, Newbie.

To be continued...

Read more »

 
 
 
 
  • Vote: I like it
  • +160
  • Vote: I do not like it

By Arpa, history, 9 months ago, In English

Hello Codeforces!

I'm glad to write a tutorial post again after several years (you can find old tutorials in my blog posts). I'm here to present an implementation for an algorithm that calculates inclusion hierarchy among circles. The main article can be found here. The repository where the implementation can be found is here. If you want to play, it has a python GUI too.

The problem

Consider $$$n$$$ non-intersecting circles. Some circles can be inside of others. We need to make a tree of these $$$n$$$ circles such that if $$$i$$$-th circle is inside of $$$j$$$-th circle, the $$$i$$$-th vertex be in the subtree of $$$j$$$-th vertex. For example:

Examples

The black vertex is the whole surface itself.

Algorithm description summary

Move the sweep-line from left to right. At each $$$x$$$, the sweep-line intersects with some circles in some segments of $$$y$$$. These segments are non-intersecting but some of them could be inside of other ones. We need to dynamically keep the order of these segments in our set (e.g. std::set in C++) and when sweep-line sees a new circle, we can find the parent of this circle in the set using a binary search (lower_bound in C++).

Time complexity is $$$\mathcal{O}(n \log n)$$$. You can find the details in the main article or the implementation.

This was my Bachelor's project, you can see the full project here.

Read more »

 
 
 
 
  • Vote: I like it
  • +65
  • Vote: I do not like it

By Arpa, history, 13 months ago, In English

Hi!

CLIS (Competitive Learning Institute Symposium) is one of the programs at ICPC World Finals every year. As you know ICPC World Finals '20 is going to be held in ~2 weeks in Moscow. I had two proposals for the symposium that both accepted. Abstract of one of them goes as follow:

We're not good in our jobs?

Peter Norvig: "One thing that I can share that was surprising to me is: being a winner of one of these programming contests was actually a negative factor for performing well on the job.",
What does it mean? We're performing badly on our jobs? If so, why?
In this presentation, I'm going to take a survey of competitive programmers on their job.

  • As a teacher, how to make CP as close as possible to the job?
  • What happens in CP and what happens on the job, why they are different?
  • What're the main abilities that CP makes them grow and what are the abilities needed on the job?
  • Is the salary of competitive programmers more than others after several years?
  • Which technologies (e. g. Networking, AI, IoT) are more close to CP?
  • What are the most important negative factors of competitive programmers, in sight of their managers on their job?
I'll do several interviews with old competitive programmers who are doing their job good and ask for their experience for better presentation.

As here is the biggest competitive programming community, can you please share your experience with me? For example,

  • If you were a competitive programmer and you're now working in a company, which abilities you're using from CP?
  • If you're a human resource specialist, can you please answer this question: Is the salary of competitive programmers more than others after several years?
  • If you're a team lead and have someone in your team that is a competitive programmer, how do you evaluate him? Are you satisfied?

PS. If you're a WF attendee, I'll be very thankful if you attend my presentation.

Update. The presentation is over. You can download the slides and watch the presentation.

Read more »

 
 
 
 
  • Vote: I like it
  • +118
  • Vote: I do not like it

By Arpa, history, 15 months ago, In English

Hi.

I recommend everyone to participate in Iranian Combinatorics Olympiad.

Read more »

 
 
 
 
  • Vote: I like it
  • -17
  • Vote: I do not like it

By Arpa, history, 19 months ago, In English

Hi!

Check out my interview with Natalia.

Read more »

 
 
 
 
  • Vote: I like it
  • +41
  • Vote: I do not like it

By Arpa, history, 19 months ago, In English

Hello Codeforces!

Every month, there will be a problem with complete explanations and solutions for one of the month's problems. Here is the problem of February. Feel free to ask me questions and suggesting edits.

Please help me by proposing a problem for the next month. In the November contests, look for a challenging problem that you would like to have complete explanations of it.

Also, what do you think about video tutorials instead of text editorial?

Read more »

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

By Arpa, history, 23 months ago, In English

Yes! I’m back with the problem of the month series, hosted by Topcoder.

Every month, there will be a problem with complete explanations and solutions for one of the problems of the month. Here is the problem of October. Feel free to ask me questions and suggesting edits.

Help me by proposing a problem for the next month. In the November contests, look for a challenging problem that you would like to have complete explanations of it.

Read more »

 
 
 
 
  • Vote: I like it
  • +28
  • Vote: I do not like it

By Arpa, history, 2 years ago, In English

Hello, Codeforces community!

I am very proud to announce SRM 787 is underway, authored by me. The contest will start today at 16:00 UTC.

It is my third experience in holding a contest at Topcoder. Holding contests on Topcoder is always memorable, having misof as contest coordinator and hmehta as a kind helper, it can't be nice more. Although struggling with Java and MPSQAS is not easy, being with a kind and professional team makes it sweet. So thank you Misof and Harshit! Also, Misof tested the contest.

Problem stories are all about my honorable mighty teacher, Abolfazl Asadi, who is currently doing great in teaching students and preparing them for INOI (Iran National Olympiad of Informatics). You will know him in problem statements as "Aqa Asadi". "Aqa" means "Sir" in Persian.

Abolfazl Asadi

I can't skip thanking my dear friend Javad javaD Karimi, who proposed the idea of Div. 1 Easy.

P. S. Please note that the coding phase will begin at 16:05 UTC but the registration will still close at 15:55 UTC.

Good luck to everyone!

Read more »

 
 
 
 
  • Vote: I like it
  • -10
  • Vote: I do not like it

By Arpa, history, 2 years ago, In English

I'm honored to introduce you to the article series, Arpa's problem of the month, hosted by Topcoder.

Every month, there will be a problem with complete explanations and solutions for one of the problems of the month. Here is the problem of April. Feel free to ask me questions and suggesting edits.

Help me by proposing a problem for the next month. In the May contests, look for a challenging problem that you would like to have complete explanations of it.

P. S. "Arpa's problem of April" is something rhythmic, isn't it?

Read more »

 
 
 
 
  • Vote: I like it
  • +6
  • Vote: I do not like it

By Arpa, history, 2 years ago, In English

Here is the link to the editorial. Feel free to discuss problems and ask me questions. I'll be glad to improve the editorial with your comments.

Read more »

 
 
 
 
  • Vote: I like it
  • +13
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Here is the link to the editorial. Feel free to discuss problems and ask me questions. I'll be glad to improve the editorial with your comments.

Read more »

 
 
 
 
  • Vote: I like it
  • +19
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hi, Codeforces community.

Today is the first day of the Persian new year (1399), we call it Nowruz. I wish everyone bug-less codes, high ratings, branded T-shirts, and, successful hacks. Also, I hope no one gets failed on system testing, no hacks after locking, and no tiredness of coding.

I'd like to finish the post with a poem:

 برآمد باد صبح و بوی نوروز

به کام دوستان و بخت پیروز

نکویی کن که دولت بینی از بخت

مبر فرمان بدگوی بدآموز

By: Saadi.

Translation:

The morning breeze and Nowrooz (new year) scent have started to blow,

Onto the friends' desire and the triumphant fortune,

Do good deeds to get goods from the world,

Don't obey malicious people.

Read more »

 
 
 
 
  • Vote: I like it
  • +89
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Here is the link to the editorial. Feel free to discuss problems and ask me questions. I'll be glad to improve the editorial with your comments.

Read more »

 
 
 
 
  • Vote: I like it
  • +14
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Here is the link to the editorial. Feel free to discuss problems and ask me questions. I'll be glad to improve the editorial with your comments.

Read more »

 
 
 
 
  • Vote: I like it
  • -8
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hi.

I used this blog and created a user list of ICPC World Finals 2020 participants. Here is the link.

For example, you can use it for filtering the scoreboards. Here is the filtered scoreboard of yesterday's contest.

Read more »

 
 
 
 
  • Vote: I like it
  • +56
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hi.

Here is the link to the editorial. Feel free to discuss problems here and ask me questions.

Read more »

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hi.

Here is the link to the editorial. Feel free to discuss problems here and ask me questions.

Read more »

 
 
 
 
  • Vote: I like it
  • +13
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

UPDATE: I'm no longer contest coordinator at HackerEarth, contact tripti@hackerearth.com for proposing problems

Hi.

Check this blog at the first. We've modified our problem selection process. Now you can use this form to submit ideas. If you submitted a problem on Ninja-Setters, send it again through this form, I can't access Ninja-Setters anymore.

Still, we need approximation problems (although it doesn't mean we don't need other problems), please submit them if you have any.

If you have questions, please send an email to me (a.poorakhavan@gmail.com) or ask in the comments. Please do not message me here.

Read more »

 
 
 
 
  • Vote: I like it
  • +9
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hi!

I'm here to introduce a new series of contests on HackerEarth, Data Structures and Algorithms (DSA) coding challenge! In this series, you will have to solve 3 problems in 1.5 hours.

The problems are classic and educational as against being creative and challenging. So, if you're learning new things, don't miss the DSA contests. These contests are similar to Codeforces Educational rounds.

We have hard problems and easy problems in this contest. After the contest, don't forget to upsolve! This will help you a lot.

The next DSA contest is on September 14, 4 AM UTC.

Authors are Devarshi (devarshi09) Khanna, Prakash (forgotter) Jha, and, Aditya (aditya123garg) Garg. I'm the tester of the round.

GL & HF!

Read more »

 
 
 
 
  • Vote: I like it
  • +30
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

UPDATE: I'm no longer contest coordinator at HackerEarth, contact tripti@hackerearth.com for proposing problems

Please read this blog as an update.

Hi everyone.

I want to describe the process to become a problem setter on HackerEarth. I'm eager to see new problem setters want to prepare contests. It's a great experience for every coder to hold a contest at least once. The first time when I prepared a contest (I was fifteen at that time, a high schooler student!) it was so sweet for me that I continued preparing problems on Codeforces, CodeChef, HackerEarth, Quera, Iran Olympiad of Informatics Finals and several more. Then I worked for 1.5 years in Quera as the contest coordinator, which was great. I'm continuing my job — Contest Coordinating — on HackerEarth from January.

We have three algorithmic contest every month, here is the table:

Contest Number of problems Approximate Difficulty Length Comments
Easy 6 Like Codeforces Div. 2 3 Hours
DS and Algo challenge 3 Easy to Medium-Hard 1.5 Hour
Circuits 8 One approximate problem and 7 algorithmic, from Very-Easy to Hard 9 Days More educational, less competitive, we could use classical problems

As you can see, we need a lot of problems every month. To propose a problem, follow this instruction:

  • Register on Ninja Setters platform. where you can write your proposal.
  • I'll check your problem soon. If approved, you should prepare test cases, solution.
  • We'll have you in a contest!

Our proposal queue is almost empty, so if you propose a problem today, with a high probability, your problem will be used in August contests. Here is the compensation table:

S. No. 
Difficulty 
level 
Indian setters (INR) 
International setters (USD) 
1 
Very Easy 
1600 
23 
2 
Easy 
2300 
35 
3 
Easy-Medium 
3000 
45 
4 
Medium 
4700 
70 
5 
Medium-Hard 
6000 
90 
6 
Hard 
8000 
120 
7 
Approx. 
8000 
120 

P. S. You don't need to prepare the whole contest. A contest may have many setters, so even if you send one problem, it's welcomed.

P. S. We need an approximation problem every month. Propose it if you have some. Check the last Circuits contest for an example.

Update. It's not needed to send me a message when you register on Ninja Setters, just wait for several days, I'll add you to group such that you can start proposing problems.

Update. Users with rating less than 1600 can propose problems but the probability of acceptance is low.

Read more »

 
 
 
 
  • Vote: I like it
  • +55
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hello everyone!

Another long and exciting contest is here, June Circuits '19, a challenging challenge with 8 amazing problems, should be solved in 9 days. The contest will start on June 21, 15:30 PM UTC.

Thanks to problem setters for doing such a fantastic job, we have 7 setters involved this time (!):

I'm tester of the round, I'm completely sure that you'll enjoy too!

To make the challenge more interesting, we will add problems to the contest in this order:

  • Day 0: Very-Easy, Easy-medium, Approximation.
  • Day 2: Medium, Medium.
  • Day 4: Medium, Medium.
  • Day 6: Medium-Hard.

As usual, there will be some sweet prizes for the top five competitors:

  • First place: $100 Amazon gift card + HE t-shirt.
  • Second place: $75 Amazon gift card + HE t-shirt.
  • Third place: $50 Amazon gift card + HE t-shirt.
  • Fourth place: HE t-shirt.
  • Fifth place: HE t-shirt.

Hope to see you on the leaderboard!

Read more »

 
 
 
 
  • Vote: I like it
  • +35
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hi all!

Happy Eid Fitr to all Muslims in the Codeforces community.

Read more »

 
 
 
 
  • Vote: I like it
  • +252
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hello!

Welcome to June Easy '19, from our easy and educational contest series. It's a 3-hour competition with six algorithmic tasks. We are going to hold it on Sunday at 16:00 GMT. Check contest page for more details.

I helped Danylo Danylo99 Mocherniuk, Mohammad-Mahdi Kerpoo Taheri, and, Dishant Dishant_18 Trivedi setting this round. AmirHossein amsen Pashaee and I are testers of the contest. As usual, here are the prizes for the top three contestants:

  • $75 Amazon gift card
  • $50 Amazon gift card
  • $25 Amazon gift card

Note that prizes and T-shirts are given to top participants with ratings < 1600 (beginners).

GL & HF.

Let's discuss the problems after the contest!

P. S. Sorry for problems occurred. Now everything fixed.

Read more »

 
 
 
 
  • Vote: I like it
  • +30
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hello everyone!

Another long and exciting contest is here, May Circuits '19, a challenging challenge with 8 amazing problems, should be solved in 10 days. The contest will start on May 24, 15:30 PM UTC.

Thanks to problem setters for doing such a fantastic job, we have:

  • Four problems from Kasra KMAASZRAA Mazaheri.
  • A problem from Danylo Danylo99 Mocherniuk.

Also, I helped them by adding three problems.

Contest Banner

I, Danial Danial Erfanian, and, Javad javaD Karimi were the testers of the round, and we enjoyed solving problems, we're entirely sure that you'll enjoy too!

To make the challenge more interesting, we will add problems to the contest in this order:

  • Day 0: Very-Easy, Easy-medium, Approximation.
  • Day 1: Easy-Medium, Easy-medium.
  • Day 4: Medium-Hard, Medium-Hard.
  • Day 6: Hard.

As usual, there will be some sweet prizes for the top five competitors:

  • First place: $100 Amazon gift card + HE t-shirt.
  • Second place: $75 Amazon gift card + HE t-shirt.
  • Third place: $50 Amazon gift card + HE t-shirt.
  • Fourth place: HE t-shirt.
  • Fifth place: HE t-shirt.

Hope to see you at the scoreboard!

Read more »

 
 
 
 
  • Vote: I like it
  • +55
  • Vote: I do not like it

By Arpa, history, 3 years ago, In English

Hello!

I'm honored to invite you to April Easy '19; it's a 3-hour competition with 6 algorithmic tasks. We are going to hold it on Saturday (Today) at 16:00 GMT (you can check your timezone here). Check contest page for more details about in-contest schedule and rules.

AghaTizi is the setter of this round and Aryan is the tester of problems. As usual, here are the prizes for the top three contestants:

  • $75 Amazon gift card
  • $50 Amazon gift card
  • $25 Amazon gift card

Note that prizes and T-shirts are given to top participants with ratings < 1600 (beginners).

GL & HF.

Let's discuss the problems after the contest!

P.S. Sorry for the late announcement.

Read more »

 
 
 
 
  • Vote: I like it
  • +90
  • Vote: I do not like it