By Alexdat2000, 10 hours ago, translation, In English

Hello everyone at!

In this round, I (Alexdat2000) and two of my friends — FairyWinx and sevlll777 — prepared 6 problems for you (one of which is divided into two subtasks), and you will have 2 hours to solve them. Everyone is welcome to follow the link: Codeforces Round 862 (Div. 2) at Apr/02/2023 17:35 (Moscow time). This round will be rated for all participants with a rating of strictly less than 2100.

And now a few acknowledgements:

Scoring distribution: 500 — 750 — 1250 — 1750 — 2250 — (1500 + 2000).

Full text and comments »

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

By ICPCNews, 7 weeks ago, In English


Hello, Codeforces!

We are happy to invite you to an exciting online event: ICPC 2023 Online Spring Challenge powered by Huawei, which will start on April 13, 2023, 11:00 UTC.

In this Challenge, you will have a unique chance:

  • to compete during 14 days online challenge
  • to solve 1 exciting problem prepared by Huawei
  • to win amazing prizes from Huawei!

As a special prize, Huawei together with ICPC Foundation will provide the travel trip to the 46th Annual ICPC World Finals in a guest role!

Everyone is welcome to participate. It is an individual competition.

ICPC 2023 Online Spring Challenge powered by Huawei (open to the public):

Start: April 13, 2023 11:00 UTC (UTC+0)
Finish: April 27, 2023 10:59 UTC (UTC+0)

We hope you'll enjoy this complex yet very exciting Challenge!


This time we’re delighted to provide you with a new challenging problem from Huawei — Buffer Sharing in Multi-Tenant Database Environment, which is prepared by Huawei 2012 Labs and Huawei Cloud Computing.

Nowadays everyone uses databases directly or indirectly. For example, databases of service providers store shopping records, transaction records, or ticket purchase records. During this challenge, you will work with the multi-tenant database, in which a single database instance is divided into multiple virtual sub-databases, serving different tenants of cloud service.

In such databases, different tenants need to be isolated from each other to prevent services from affecting each other. Therefore, buffer is considered as an important resource for management of large amount of data. When the amount of data in the database buffer reaches the maximum value, the database buffer evicts some data from the memory based on the eviction algorithm and loads new data pages from the disk. Your goal is to optimize sharing and isolation of database buffers in the multi-tenant database. While replacement algorithms considered in this contest be one of the core algorithms, we believe there are multiple approaches one can try here, and some crossover of the algorithms will also increase your chances to win!



Rank Prize
Grand Prize (Rank 1) € 15 000 EUR + the travel trip to the 46th Annual ICPC World Finals in a guest role
First Prize (Rank 2-10) € 8,000 EUR
Second Prize (Rank 11-30) € 3,000 EUR
Third Prize (Rank 31-60): € 800 EUR
TOP 200 Participants Souvenir T-shirt
* If the allocated Huawei Challenge prize cannot be delivered to your region for any reason it may be replaced by another prize of the same value (if no legal restrictions), at the discretion of the Sponsor.

Challenge Rules and Conditions

By participating in this Challenge, you agree to the Conditions of Participation and Challenge Rules. If you cannot access this document, please email

Good luck, we hope this will be fun!

Full text and comments »

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

By flamestorm, 2 days ago, In English

Hello, Codeforces!

I, along with AlperenT, Ari, BucketPotato, ScarletS, and ToxicPie9, would like to invite everyone on Codeforces to the April Fools Day Contest 2023! The 11th April Fools Day Contest will take place on Apr/01/2023 17:35 (Moscow time). This is a joke competition in which solving the problem is often easier than figuring out what the actual task is.

Please note that the round is unrated.

In this round you'll be given $$$n$$$ weird problems and 2 hours to solve them, where $$$7 \leq n \leq 12$$$. At most $$$\sqrt{n}$$$ of the problems will be interactive. The contest will use ACM ICPC rules (no hacks, the standings are decided by the number of solved problems and penalty time earned on them).

You can submit solutions in any language allowed by Codeforces, unless the problem says otherwise. To get an idea of what the contest will look like, you can check out the contests of the past years: 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021, 2022.

Good luck, and have fun!

UPD1: Thanks willy108 for testing!

UPD2: The editorial is released!

UPD3: Congrats to the winners!

  1. InternetPerson10
  2. Geothermal
  3. A_G
  4. Maksim1744
  5. LJC00118

And congrats to the first solvers!

UPD4: Sorry for the inconvenience, the contest is now open for practice submissions + virtuals.

Full text and comments »

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

By RDDCCD, history, 4 days ago, In English

Hello, Codeforces!

I'm very glad to invite you to participate in CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!), which will start on Mar/31/2023 17:35 (Moscow time).You will be given 8 problems and 2 hours to solve them. The round will be rated for everyone.

I'd like to give my sincere thanks to:

Hope everyone can enjoy the round!

UPD: The tutorial is here.

And here is the information from our title sponsor:

Hello, Codeforces!

We, the TON Foundation team, are pleased to support CodeTON Round 4.

The Open Network (TON) is a fully decentralized layer-1 blockchain designed to onboard billions of users to Web3.

Since July 2022, we have been supporting Codeforces as a title sponsor. This round is another way for us to contribute to the development of the community.

The winners of CodeTON Round 4 will receive valuable prizes.

The first 1,023 participants will receive prizes in TON cryptocurrency:

  • 1st place: 1,024 TON
  • 2–3 places: 512 TON each
  • 4–7 places: 256 TON each
  • 8–15 places: 128 TON each
  • 512–1,023 places: 2 TON each

We wish you good luck at CodeTON Round 4 and hope you enjoy the contest!

Full text and comments »

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

By ConstructorU, history, 12 days ago, In English

Greetings Codeforces community!


We are excited to announce the Constructor Open Cup 2023, our annual online programming competition organized by Constructor University and JetBrains.

What is the Constructor Open Cup 2023?

Constructor Open Cup is an online contest organized by Constructor University and JetBrains, the global leading tool provider for developers, to promote interest in computer science, data science, software development, and software engineering. You'll have to race against the clock to solve real-life programming challenges.

Put your knowledge and skills to the test in this 4-hour competition and stand a chance to walk away with a scholarship for the Bachelor's degree in Data Science and Software Development at Constructor University, Germany’s #1 private university*!

Constructor Open Cup timetable

  • March 23-29, 2023 | Practice Round

Get familiar with the testing environment during this practice round. We highly recommend this optional step. Don’t worry: it won’t affect your final score!

You will have 4 hours to complete a series of algorithmic programming tasks of various difficulty levels.

Registration closes 1 hour before the start of the contest.

Prizes and Winner Announcement

The top candidates will receive exciting prizes, including:

  • Chance to get scholarships for the Bachelor’s degree in Data Science and Software Development*
  • Exciting memorable gifts from Constructor University and JetBrains

We're looking forward to seeing your programming skills on competition day, and we wish you the best of luck.

Register now!

*The winners who applied to the BSc program in Data Science and Software Development will receive an email to schedule the interview with Constructor University professors and JetBrains.

Can I participate?

Everyone is welcome! The contest is open for all ages and skill levels, all you need is a passion for coding.

To get the chance for the JetBrains scholarship for Data Science and Software Development program, please check Constructor University’s eligibility requirements.

How can I participate?

  • Register your details here.
  • Register at Codeforces using the Login/Password you receive in the confirmation email.
  • If you have any further queries, please reach out to

Why should I join the Constructor Open Cup?

Previously known as ‘STAR Contest’, the competition attracted more than 1,600 contestants across 82 countries over the past three years. Renamed to Constructor Open Cup in 2023, this contest welcomes all regardless of age, qualifications, or skill level.

By participating in the Constructor Open Cup, you will:

  • Get recognized by top science and technology leaders
  • Pit your algorithmic problem-solving skills against competitors from other countries
  • Get a chance to get a full scholarship for BSc program in Data Science and Software Development

Don't miss out on this exciting opportunity to challenge yourself and showcase your talents. Join the Constructor Open Cup today!

About the BSc Data Science and Software Development program

This program prepares talents to become tomorrow’s elites in software development, programming languages, data analysis, and machine learning. You will benefit from the latest insights and knowledge from top industry partners and get the right skills needed for these rapidly changing industries. Through real-world projects, the practice of the latest technologies, and the close mentoring of industry experts, you will gain a unique experience that sets you up for successful career opportunities. Learn more about the program here.

About Constructor University

Founded in 2001 as a private, English-language campus university, it repeatedly achieves top results in national and international university rankings. Its more than 1,600 students come from over 110 countries, and around 80 percent have moved to Germany to study. Research projects at the University are funded by the German Research Foundation, the European Union's Framework Program for Research and Innovation, and global leading companies.

About JetBrains

JetBrains creates intelligent software development tools used by over 15.9 million professionals and 90 Fortune Global Top100 companies. Its lineup of more than 30 products includes IDEs for most programming languages and technologies, such as IntelliJ IDEA, PyCharm, and others, as well as products for team collaboration, like JetBrains Space. JetBrains is also known for creating the Kotlin programming language, recognized by Google as the preferred language for Android development. The company is headquartered in Prague, Czech Republic, and has offices throughout the world. For more information, please visit

Full text and comments »

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

By Wind_Eagle, 6 days ago, translation, In English


Hello, Codeforces!

I am very glad to invite you to the Codeforces Round #861 (Div. 2), which will take place in Mar/29/2023 12:05 (Moscow time). This round will be rated for the participants with rating lower than 2100.

My sincere thanks to:

You will have 2 hours and 30 minutes for solving 6 tasks, one of which will be divided into easy and hard verions. The round is based on the problems from the Belarusian National Olympiad. We kindly ask all Belarusian students who participated in this olympiad, to refrain from taking part in this round and discussing the problems publicly before the round ends.

I hope you will enjoy the round!

Round testers (will be available later): Ormlis, 4qqqq, nnv-nick, olya.masaeva, Makcum888.

Preliminary score distribution: 750-1000-1500-2000-2500-3250.

UPD: the round was rebalanced. You will have 2 hours for solving 5 tasks, one of which will be divided into easy, medium and hard verions.

Score distribution: 750-1000-1500-1750-(1750+1000+750).



Div. 1 + Div. 2:

1) BurnedChicken

2) maspy

3) happylmb

Div. 2:

1) happylmb

2) Cherished

3) 2021_yes

Full text and comments »

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

By sevlll777, 8 days ago, translation, In English

Hello Codeforces!

I am happy to invite you to Codeforces Round 860 (Div. 2), which will be held on Mar/26/2023 17:35 (Moscow time).

This round will be rated for participants with rating lower than 2100. Participants with a higher rating are invited to participate in the round unofficially.

You will be given 6 problems and 120 minutes to solve them. All problems were authored and prepared by me.

The traditional thanks-list to everyone who took part in the creation of the round:

🤴 DishonoredRighteous for coordinating the round

🐞 gyh20 for black-red testing of the round

😈 feecIe6418, iakovlev.zakhar, Dart-Xeyter, Adam_GS, felys, golikovnik, Gary2005 for red testing of the round

🐫 NemanjaSo2005, Alexdat2000, Kon567889, tem_shett for orange testing of the round

👾 SlavicG, Psychotic_D for purple testing of the round

🐳 C2A, Masha237, ayhan23, Dhru008, Brahma_tet for blue testing of the round

👽 Lord_David for green testing of the round

🦄 mejiamejia for help with testers for the round

🤡 sevlll777 for the problem, without which the round would be unbalanced, and the problems that were not included in the final problemset

🎅 MikeMirzayanov for the amazing Codeforces and Polygon platforms

Personal recommendations

I sincerely hope that you will find the problems interesting and you will enjoy solving them. Good luck!

Score Distribution:

500 — 750 — 1250 — 1750 — 2250 — 3000

UPD: Editorial



  1. jiangly

  2. A_G

  3. neal

  4. maspy

  5. turmax


  1. satyam343

  2. Profect

  3. RGB_ICPC7

  4. amirhoseinfar1385

  5. vbgladkikh

First AC:

A: nifek

B: happy.potato

C: happy.potato

D: aryan12

E: aibark

F: zihouzhong

Full text and comments »

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

By awoo, history, 11 days ago, translation, In English

Hello Codeforces!

On Mar/23/2023 17:35 (Moscow time) Educational Codeforces Round 145 (Rated for Div. 2) will start.

Series of Educational Rounds continue being held as Harbour.Space University initiative! You can read the details about the cooperation between Harbour.Space University and Codeforces in the blog post.

This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 6 or 7 problems and 2 hours to solve them.

The problems were invented and prepared by Adilbek adedalic Dalabaev, Ivan BledDest Androsov, Maksim Neon Mescheryakov and me. Also, huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

Our friends at Harbour.Space also have a message for you:


Hey, Codeforces!

We're excited to announce that registration for the Leagues of Code Summer Camp is now open! This year, Harbour.Space University and Leagues of Code are organising a programming camp in Menorca from July 1st to the 15th!

Our Summer Camp is a training program that will teach participants competitive programming. We are inviting students ages 10 to 18 interested in improving their skills or seeking intensive, high-level training. Participants will be divided into classes based on their level and previous experience. Classes will be held in English.

Join a coding camp that brings you the brightest stars in tech!

Here is a summary of the camp :

  • Duration: 2 weeks
  • Dates: July 1st to 15th
  • Place: Menorca
  • Levels:
  1. Zero: Our "Zero" course is designed for anyone without programming experience. Through interactive lessons and engaging activities, they'll learn the fundamentals of coding and build a strong foundation for future learning

  2. Beginner: Our beginner coding course is designed for participants who have some basic programming knowledge but want to take their skills to the next level. The course covers programming fundamentals and builds on prior knowledge, focusing on problem-solving, critical thinking, and project-based learning

  3. Intermediate: Become a pro-grammarians by diving into the main concepts of web and game development. No coding experience? No problem! We'll help you get started, and by the end of the bootcamp, you'll be a coding ninja with a cool project under your belt!

  4. Advanced: Ready to put your brain to the test? Our camp will have you solving algorithms like a pro and competing like a champion with the guidance of world medalists. By the end of camp, you'll be a coding champion with a trophy in your virtual hands!

Ready to join our Summer Camp in Menorca? We have a 30% discount for Codeforces participants using the code CODPARMEBO30.

Register here→

UPD: Editorial is out

Full text and comments »

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