Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

Arpa's blog

By Arpa, history, 2 weeks 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 months 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, 3 months 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 months 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, 4 months 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, 4 months 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, 4 months 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, 4 months 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, 4 months 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, 5 months 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, 5 months ago, In English,

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're in need of 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 comments. Please do not message me here.

Read more »

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

By Arpa, history, 10 months 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, 11 months ago, In English,

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, 13 months 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, 13 months 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, 13 months 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, 14 months 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 Dani 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, 15 months 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

By Arpa, history, 16 months ago, In English,

Hello everyone!

As the new contest coordinator in HackerEarth, I'm honored to announce, we're here with the new version of circuits contests, March Circuits '19, a challenging challenge with 8 amazing problems, should be solved in 10 days. The contest will start on March 22, 15:30 PM UCT.

This time setters around the world helped us make this round possible. We have:

Contest Banner

I was the tester of the round and enjoyed solving problems, I'm sure that you'll enjoy too!

To make the challenge more interesting, problems added to the contest in this order:

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

As usual, there will be some nice 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!

Good Luck & Have Fun ;)

Read more »

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

By Arpa, history, 17 months ago, In English,

Hello!

As the new Contest Coordinator at HackerEarth, I'm honored to invite you to HackerEarth HourStorm #8; it's a 1-hour competition with 3 traditional (but nice) algorithmic tasks. We are going to hold it on Friday at 14:30 GMT (you can check the time here.

For traditional algorithmic tasks, you will receive points for every test case your solution passes, so you can get some points with partial solutions as well. Check contest page for more details about in-contest schedule and rules.

AJ_Coder is the setter of this round and I'm the tester of problems. Prepared problems were interesting and I enjoyed solving them, I hope you find them interesting too. As usual, here are the prizes for the top three contestants:

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

In addition, the top 5 will win HackerEarth t-shirts.

GL & HF.

Let's discuss the problems after the contest!

P.S. I'm sorry for the problem occurred on problem B (A counting problem). I was the tester of this contest; the problem was Anand has changed test cases and didn't run my solution on test cases again and his solution has a little bug, so test cases 17-29 were wrong. We apologize for this problem. Now rejudge is done.

Here are the winners:

Read more »

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

By Arpa, history, 19 months ago, In English,

Hello, We would like to invite the Codeforces community to the CodeChef November Lunchtime 2018 sponsored by Sharechat — a contest you will surely enjoy competing in. This is a 3-hour contest with 5 problems to work on and it’s open to programmers across the globe.

The contest problems will be available in English, Hindi, Bengali, Russian, Mandarin and Vietnamese. In addition, there are some exciting job opportunities from ShareChat — India’s fastest growing social network for programmers across the globe. For more details, you may visit the November Lunchtime contest page.

I hope you will join your fellow programmers and enjoy the contest problems. Joining me on the problem setting panel are:

  • Setter: Nots0fast (Rehim Memmedli)
  • Tester: Arpa (AmirReza PoorAkhavan)
  • Statement Verifier: xellos (Jakub Safin)
  • Editorialist: Deadwing (Hussain Kara Fallah)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Vietnamese Translator: Team VNOI
  • Russian Translator: Fedosik (Fedor Korobeinikov)
  • Bengali Translator: solaimanope (Mohammad Solaiman)
  • Hindi Translator: Akash Shrivastava

Contest Details:

  • Start Date & Time: 24th November 2018 (1930 hrs) to 24th November 2018 (2230 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone
  • Contest link: https://www.codechef.com/LTIME66
  • Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.
  • Prizes: Top 10 school students each from Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: https://discuss.codechef.com/questions/51999/how-do-i-win-a-codechef-goodie

(For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck!

Hope to see you participating!!

Happy Programming!!

P.S. As tester, I encourage you to participate in the contest, nice problems are prepared.

Read more »

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

By Arpa, history, 3 years ago, In English,

Hi!

Thanks to all of you participates, who made this contest possible. And thanks to Lewin and Arterm, also to the great coordinator, Nikolay KAN Kalinin, zemen, white2302, and for sure MikeMirzayanov.

Test data and code solutions. It's the original packages from polygon, you can find pretests, tests, generators, validators, etc in it.

Hints

Div.2 A: Take a look at notes section.

Div.2 B: Create a circle with these points.

Div.1 B: Fix the gcd.

Div.1 C: Tag: Grundy number.

Details

Div.1 C

I want to thank my grand teacher Mojtaba moji FayazBakhsh here. Who was my teacher not only for coding but also a teacher for my life. Thanks Mojtaba! Thanks to you and all of other good teachers in the world.

Solutions

Tutorial is loading...

Author: Arpa

Tutorial is loading...

Author: Arpa

Tutorial is loading...

Author: Lewin

Thanks to Lewin, the writer of this tutorial.

Tutorial is loading...

Author: Arpa

Tutorial is loading...

Author: Arpa

Tutorial is loading...

Author: Arterm

Thanks to white2302, the writer of this tutorial. I translated this tutorial to English.

Tutorial is loading...

Author: Arterm

Thanks to Arterm, the writer of this tutorial.

Tutorial is loading...

Author: Lewin

Thanks to Lewin, the writer of this tutorial.

I’d like to finish the editorial with the below poem by Hatef Esfahani:

چه کند کوه کن دلشده با غیرت عشق گر نه بر فرق زند تیشه ز رشک خسرو

Translation: What can lover (Farhad) do with the power of love? He has no choice but to hurt himself by ax because he feels jealousy to Khosrow. More information about Khosrow and Shirin story.

Good luck and see you soon ;)

Read more »

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

By Arpa, history, 3 years ago, In English,

Hi!

I'm honored to invite you to Codeforces Round #432, it will be held on 4th September 14:35 UTC. There will be 5 problems for each division, as usual, you have 2:30 to solve the problems. The contest was prepared by Lewin Lewin Gan, Artsem Arterm Zhuk and me.

The IndiaHacks Final Round will be held on 3rd September 12:30. Finalist must not discuss the problems after their contest.

The stories of my problems will be about Arpa, although in one problem you'll see Mojtaba Moji FayazBakhsh, my great teacher.

I'd like to thank Lewin, Artsem and myself (:P) at first, then Konstantin zemen Semenov and white2302 for testing the problems, Nikolay KAN Kalinin for helping us in moving the contest to codeforces and Mike MikeMirzayanov Mirzayanov for the great Codeforces and Polygon platforms.

The scoring distribution will be announced later.

Obviously, if you are interested in if the round is rated or not, ask in comments and get a lot of down votes.

UPD. There will be 5 problems for div.2 and 6 problems for div.1.

UPD2. Scoring Distribution: div.1: 500-1000-1250-1750-2000-2500, div.2: 500-1000-1500-2000-2500.

UPD3. Editorial is partially ready. I'll complete it soon.

Congratulations to winners:

Div.1:

1 . AngryBacon

2 . dreamoon

3 . sd0061

4 . W4yneb0t

5 . Um_nik

Div.2:

1 . miaom

2 . fzzzq2002

3 . igoodvegetableb

4 . _Lucas97 and Szymanski_w (WoW !!)

Official results

Read more »

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

By Arpa, history, 3 years ago, In English,

Hi!

Hints

A: Tag: Greedy!

B: Tag: Greedy!

C: For each vertex like v find ex v, the expected length of their journey if they start from v.

D: Tag: Inclusion exclusion.

E: Find the maximum clique.

Solutions

Tutorial is loading...

Arpa's solution: 29412123.

Tutorial is loading...

Arpa's solution: 29412154.

Tutorial is loading...

Arpa's solution: 29412220.

Tutorial is loading...

MaGaroo's solution: 29458745.

Tutorial is loading...

Arpa's solution: 29412249.

P.S. Please notify me if there is any problem.

Read more »

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

By Arpa, history, 3 years ago, In English,

Hi!

Hints

A: Let Cost(k) the answer if we compress the image with k, find min Cost(k).

B: Solve the problem without first query.

C: Let the frequencies of the characters be a 1, a 2, ..., a k. Alice loses if and only if is odd and n is even.

D: Consider adding an extra seat, and the plane is now circular.

E: Let dp i, j be the longest path given that we've included segment i, j in our solution, and we are only considering points to the right of ray i, j (so dp i, j and dpj, i may be different).

F: We want to compute dp i, j: expected value given we have seen i red balls and j black balls.

Solutions

Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...

Codes here.

P.S. Please notify me if there are any problems.

Read more »

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