cry's blog

By cry, 2 days ago, In English

It seems like all GIFs in problem statements are broken.

Remember when the triangle in the notes section of 2009D - Satyam and Counting used to animate? I sure did, because I spent 2 hours making it (5 minutes on the actual GIF and the other 115 minutes on compressing the image size). Now it's just a static image D;

It's worth noting that Polygon never supported GIFs, I just converted my GIF to an APNG then uploaded it as a PNG as described in this comment.

But it's a new era now and that has broken as well. If anyone finds any other bypasses, then please let me know. Otherwise, KAN and MikeMirzayanov may have to actually implement GIFs D;

Full text and comments »

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

By cry, 3 days ago, In English

Special thanks to our hub of testuwuers for contributing solution explanations!

2044A - Easy Problem

Problem Credits: cry
Analysis: macaquedev

Solution

2044B - Normal Problem

Problem Credits: Lilypad
Analysis: Lilypad, macaquedev

Solution

2044C - Hard Problem

Problem Credits: cry
Analysis: macaquedev

Solution

2044D - Harder Problem

Problem Credits: cry, vgoofficial
Analysis: macaquedev

Solution

2044E - Insane Problem

Problem Credits: vgoofficial,Lilypad
Analysis: macaquedev, chromate00

Solution 1 (Binary Search)
Solution 2 (Intervals)

2044F - Easy Demon Problem

Problem Credits: chromate00, vgoofficial
Analysis: SkibidiPilav

Are you a python user and failing test 12?
Solution

2044G1 - Medium Demon Problem (easy version)

Problem Credits: Lilypad
Analysis: macaquedev

Solution

2044G2 - Medium Demon Problem (hard version)

Problem Credits: Lilypad
Analysis: vgoofficial

Solution

2044H - Hard Demon Problem

Problem Credits: cry
Analysis: chromate00

Solution

Full text and comments »

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

By cry, 11 days ago, In English

Hello Cowodeforces :D

Art by chromate00

vgoofficial, Lilypad and I are very to invite you to participate in Codeforces Round 993 (Div. 4), which will start on Dec/15/2024 17:35 (Moscow time). There will be $$$8$$$ problems, with one split into two subtasks, to be solved in $$$2$$$ hours and $$$15$$$ minutes. Participate or you'll have to wait another millennium for a Div. 4 round.

The format of the event will be identical to Div. 3 rounds:

  • ICPC rules with a penalty of 10 minutes for an incorrect submission;
  • 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
  • after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
  • by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1400 or higher in the rating.

Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), you may choose to participate rated or unrated.

We want to express overwhelming gratitude to the following orzosities for making the contest possible:

UPD: Editorial

Full text and comments »

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

By cry, 2 months ago, In English

Welcome to Natlan, Codeforces!

sum, vgoofficial and I are like a dog with two tails to welcome you to participate in Codeforces Round 988 (Div. 3) at Nov/17/2024 17:35 (Moscow time). We have cooked up $$$7$$$ problems to be solved in $$$2$$$ hours and $$$15$$$ minutes.

The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks. After open hacks all accepted solutions will be rejudged on successful hacks.

Note that the penalty for each wrong submission in this round is 10 minutes. Also, note the rule restricting AI use!!! If you are caught using AI in an unorthodox manner, bad things will happen to you. We will be watching you all...

IMPORTANT!!! There is at least one interactive problem in the problemset. Please familiarize yourself with the guide for interactive problems beforehand.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them)
  • do not have a rating of 1900 or higher at any moment in time.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you (unless you register unrated).

We would like to orz the following individuals for making the contest possible:

UPD: Editorial!!!

Full text and comments »

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

By cry, 2 months ago, In English

2037A - Twice

Problem Credits: cry
Analysis: cry

Solution
Code (Python)

2037B - Intercepted Inputs

Problem Credits: cry
Analysis: chromate00

Are you a python user and failing test 4?
Solution
Code (Python)

2037C - Superultra's Favorite Permutation

Problem Credits: sum
Analysis: chromate00

Solution
Code (Python)

2037D - Sharky Surfing

Problem Credits: cry
Analysis: chromate00

Solution
Code (Python)

2037E - Kachina's Favorite Binary String

Problem Credits: vgoofficial
Analysis: Intellegent

Solution
Code (Python)

2037F - Ardent Flames

Problem Credits: vgoofficial
Analysis: vgoofficial

Solution
Code (Python)

2037G - Natlan Exploring

Problem Credits: vgoofficial
Analysis: vgoofficial

Solution
Code (Python)

Full text and comments »

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

By cry, 2 months ago, In English

Haiii Codeforces ^_^

Note the unusual starting time. This round starts 30 minutes before the standard starting time.

vgoofficial and I are extremely excited to invite you to Codeforces Round 979 (Div. 2) on Oct/19/2024 17:05 (Moscow time). You will be given 7 problems and 2 hours and 15 minutes to solve them. One problem will be split into two subtasks. This round will be rated for all participants with rating below 2100.

This round is based on... absolutely nothing.

We would like to mention the following individuals for making the contest possible:

Score Distribution: $$$250 - 500 - 1000 - 1500 - 2000 - 2500 - (3000 + 1500)$$$

UPD: Editorial

Full text and comments »

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

By cry, 2 months ago, In English

Below is a timeline of the changes made to the round from start to finish. I hope this can depict what setting a contest is actually like for aspiring problemsetters. Please give me feedback about this in the comments. What else about the round would you like to know? Was this helpful?

Round Timeline

Please check out this amazing animated video tutorial by one of our beloved testers redpanda!!!

2030A - A Gift From Orangutan

Problem Credits: vgoofficial
Analysis: vgoofficial

Solution
Code (Python)

2030B - Minimise Oneness

Problem Credits: vgoofficial
Analysis: vgoofficial

Solution
Code (C++)

2030C - A TRUE Battle

Problem Credits: vgoofficial
Analysis: vgoofficial

Solution
Code (C++)

2030D - QED's Favorite Permutation

Problem Credits: vgoofficial, cry
Analysis: cry

Solution
Code (C++)

2030E - MEXimize the Score

Problem Credits: vgoofficial, cry, satyam343
Analysis: cry

Solution
Code (C++)

2030F - Orangutan Approved Subarrays

Problem Credits: vgoofficial, satyam343
Analysis: vgoofficial

Solution
Code (C++)

2030G1 - The Destruction of the Universe (Easy Version) and 2030G2 - The Destruction of the Universe (Hard Version)

Problem Credits: vgoofficial, satyam343
Analysis: satyam343

Solution (Easy Version)
Solution (Hard Version)
G1 Code (C++)
G2 Code (C++)

Full text and comments »

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

By cry, 4 months ago, In English

Heyo Codefoworcers!

vgoofficial and I are very delighted to invite you to participate in Codeforces Round 971 (Div. 4), which will start on Sep/03/2024 17:35 (Moscow time). There will be $$$7$$$ problems, with one split into three subtasks, to be solved in $$$2$$$ hours and $$$30$$$ minutes. We encourage you to participate and hope you have fun, regardless of your division!

The format of the event will be identical to Div. 3 rounds:

  • 5-8 tasks;
  • ICPC rules with a penalty of 10 minutes for an incorrect submission;
  • 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
  • after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
  • by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1400 or higher in the rating.

Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), you may choose to participate rated or unrated.

We want to express overwhelming gratitude to the following orzosities for making the contest possible:

01100 00000 11000 10011 00111 01000 10010 01001 01110 10100 10001 01101 00100 11000 01011 00100 00000 00011 10100 10010 10010 10011 00000 10001 10110 00000 10001 00011

UPD: The round will be unrated, even though m1.codeforces.com, m2.codeforces.com, and m3.codeforces.com were functioning correctly. While there were issues on the main site (which lasted more than an hour), no participant was able to view the leaderboard, ask a question, or receive an answer.

Editorial

Full text and comments »

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

By cry, 4 months ago, In English

Thanks for participating! Despite the round being unrated, we hope you've enjoyed the problemset. We put a lot of effort into this round :prayge:

I want to give huge thanks to Dominater069 and satyam343 for their heavy contributions to the subtasks of G. If you're participating out of competition, we hope you enjoyed attempting these bonus subtasks. Otherwise, we hope you will enjoy upsolving them!

2009A - Minimize!

Problem Credits: cry
Analysis: cry

Solution
Code (Python) (ntarsis30)

2009B - osu!mania

Problem Credits: cry
Analysis: cry

Solution
Code (Python) (chromate00)

2009C - The Legend of Freya the Frog

Problem Credits: vgoofficial
Analysis: cry

Solution
Code (Python) (ntarsis30)

2009D - Satyam and Counting

Problem Credits: vgoofficial
Analysis: cry

Solution
Code (Python) (ntarsis30)

2009E - Klee's SUPER DUPER LARGE Array!!!

Problem Credits: cry
Analysis: cry

Solution
Code (Python) (ntarsis30)

Bonus: Solve in $$$\mathcal{O}(1)$$$.

Code (Python) (Non-origination)

2009F - Firefly's Queries

Problem Credits: cry
Analysis: cry

Solution
Code (C++) (awesomeguy856)

2009G1 - Yunli's Subarray Queries (easy version)

Problem Credits: cry, vgoofficial
Analysis: vgoofficial

Solution
Code (C++) (yash_9a3b)

2009G2 - Yunli's Subarray Queries (hard version)

Analysis: Solution 1: vgoofficial, Solution 2: awesomeguy856

Prologue
Solution 1 (Lazy Segment Tree, Offline)
Code (C++) (vgoofficial)
Solution 2 (Binary Lifting, Online)
Code (C++) (awesomeguy856)

2009G3 - Yunli's Subarray Queries (extreme version)

Analysis: Dominater069

Solution
Code (C++) (awesomeguy856)

Full text and comments »

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

By cry, 4 months ago, In English

Hello Codeforcers, especially fellow problemsetters.

I'm lazy. I like setting cool problems, but I don't enjoy preparing them. Sometimes, I take longer to prepare a problem than coming up with the idea. Surely I'm not the only one. My laziness has motivated me to make this blog about a feature I think will benefit the future of problemsetting and more frequent contests for codeforces.

I propose that there should be a hub for crowdsourcing useful generators from past problems. Similar to a hub for Minecraft mods, I think there should be something similar for testlib generators. Authors of past rounds should be able to upload generators to that hub. They should be able to specify the tags (number theory, brute force, tree) solutions that their generator targets to TLE, and be able to specify what makes their generator special. For example, there can be generators focused on special kinds of trees required to make strong tests for a certain tree query problem. Future problemsetters should be able search up the types of generators they need for their own problems and examine these posted generators and modify it to their own needs. This should save them a lot time. Sometimes, they can recognize other problems on CF and think "man, it would be nice if I had a generator that this problem also requires".

Here's an example, consider 1985E - Secret Box. The solution to it requires to loop through all possible factors of two of the three integers given in the input. Obviously, inputs that are big but also have a lot of factors should be nice. If only someone made a generator on selecting random numbers with large amount of factors in a range, like a more extensive list of Highly Composite Numbers :weary:

Anyways, TLDR: this would be quite cool though :v

KAN, MikeMirzayanov

Full text and comments »

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

By cry, 4 months ago, In English

In the comments section of my most recent round, there has been a lot of misconceptions about interpreting score distribution. This blog is just to inform the correct way of understanding them from a problemsetter standpoint.

The biggest misconception I saw was score distributions are always almost equal to its difficulty. This is not true. Do you really think 1852A - Ntarsis' Set is a rated 500 problem?

The correct way to interpreting score distribution is looking at the differences between each adjacent gaps. I will give suggestions on interpreting difference in points in a Div. 2 round. Div. 1 Scoring may be different because the difficulty curve is different.

Usually, a $$$250$$$ point gap means the two problems are relatively similar in difficulty but with a slight difficulty increment. A $$$500$$$ point gap represents the standard gap between adjacent problems that you'd expect. I think any gap $$$750$$$ or above means there is a decently large difficulty discrepancy between the two problems. I will use Codeforces Round 965 (Div. 2) as an example.

Problems A and B are expected to be similar difficulty with B being slightly challenging. B and C are $$$500$$$ apart, which means that the difficulty difference between B and C is expected to be larger than that for A and B. In hindsight, I probably should've assigned a $$$750$$$ point difference. This is also why you shouldn't rely on score distribution to determine whether you should approach a problem or not, as the assigned difference could be higher or lower than the actual gap. Again, there is a $$$250$$$ gap between C and D so they are expected to be relatively close in difficulty but D should still be harder than C; same for D and E1.

Problems with subtasks usually come with $$$(x + y)$$$ in the announcement blog, with $$$x$$$ being the score assigned to the easy version and $$$y$$$ for the harder version. In most round, this usually means that if the easy version is a stand-alone problem, then it should be assigned $$$x$$$ points. If only hard version is proposed, then it should be worth $$$x+y$$$ points. However, I don't believe that this should always be the case in the future, which is why this blog is also a suggestion to future problemsetters.

Originally, E1 was going to be assigned $$$2000$$$ points and E2 assigned $$$1000$$$ points. Then, one of our testers, Dominater069 said "I wrote 10 mins of ds for E1 for $$$2000$$$ points... And then take 30 mins just for $$$1000$$$ points?" I thought about this and I was like, he has a point. There has been a lot of instances where the hard version is a lot harder than the easy version, but isn't worth a significant amount of points on its own. Therefore, I think setters should weigh the hard version like a standalone problem, and decrease its value based on how much of the observation that the easy version gives away.

Lastly, score distributions aren't always accurate. They are usually only decided by setters, the coordinator, and a small subset of the testers. You shouldn't get scared if you see a large score gap between problems. Most of the time, us setters also get surprised by the performance of you codeforcers.

Full text and comments »

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

By cry, 5 months ago, In English

Wazzup Codeforcers!

sum, satyam343, and I are extremely ecstatic to invite you to Codeforces Round 965 (Div. 2) on Aug/10/2024 17:35 (Moscow time). You will be given 5 problems and 2 hours to solve them. 1 problem will have subtasks. This round will be rated for all participants with rating below 2100. We spent the most time cooking up this round than any other round, so it means a lot if you will participate.

We would like to orz the following individuals for making the contest possible:

Score Distribution: $$$500 - 750 - 1250 - 1500 - (1750 + 1750)$$$

UPD: We know there has been a lot of disapproval for problem C. We're sorry for it. Please view https://mirror.codeforces.com/blog/entry/132507

UPD: Editorial

Full text and comments »

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

By cry, 5 months ago, In English

I accidentally copied a CodeChef problem.

I was just made aware by satyam343 that 1996A - Legs somehow COINCIDES EXACTLY with FARMLEGS.

I had zero idea this problem even existed before right now. I even thought satyam343 was trolling and thought this problem was only published after my contest. It wasn't until I looked at submission dates that I noticed the problem was created more than three months ago... My problem was based on a mixture of middle-school word problems and me casually thinking of USACO cows.

Regarding how even the constraints are exactly the same: The constraints were initially $$$t \leq 10^5$$$ and $$$n \leq 2 \cdot 10^5$$$, but a tester did $$$O(tn)$$$ and still passed all test cases. Obviously, this is hackable, so we have to either decide to add a third test case with all tests being $$$2 \cdot 10^5$$$ or make $$$O(tn)$$$ comfortably pass. We didn't want to blow up queue even more, so we resorted to the latter option.

Anyways, this is way too funny, so I have to make a blog. This is also even more ironic since I advertised a CodeChef contest in the comments :skull:

Full text and comments »

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

By cry, 5 months ago, In English

Hewwo Cowodeforcers!

sum and I are overjoyed to welcome you to participate in Codeforces Round 962 (Div. 3) on Jul/26/2024 17:35 (Moscow time). This contest is the last stop on our mission to problemset for every division. We hope you've been enjoying our stuff so far!

The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks. After open hacks all accepted solutions will be rejudged on successful hacks.

You will be given 7 problems and 2 hours and 15 minutes to solve them.

Note that the penalty for each wrong submission in this round is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them)
  • do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

We would like to orz the following individuals for making the contest possible:

Thank you for reading and we hope you have a fun and educational interstellar adventure :3

UPD: Editorial

Full text and comments »

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

By cry, 5 months ago, In English

1996A - Legs

Problem Credits: cry
Analysis: cry

Solution
Code (C++)

1996B - Scale

Problem Credits: sum
Analysis: cry

Solution
Code (C++)

1996C - Sort

Problem Credits: cry
Analysis: cry

Solution
Code (C++)

1996D - Fun

Problem Credits: sum
Analysis: cry

Solution
Code (C++)

1996E - Decode

Problem Credits: cry
Analysis: cry

Solution
Code 1 (C++)
Code 2 (A Little Different) (C++)

1996F - Bomb

Problem Credits: sum
Analysis: cry

Solution
Code 1 (C++)
Code 2 (C++)

1996G - Penacony

Problem Credits: cry
Analysis: cry, awesomeguy856

Solution - Segment Tree
Code (C++)
Solution - XOR Hashing (by awesomeguy856)
Code (C++)

Full text and comments »

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

By cry, 6 months ago, In English

1998A - Find K Distinct Points with Fixed Center

Problem Credits: sum
Analysis: cry

Solution
Code (C++)

1998B - Minimize Equal Sum Subarrays

Problem Credits: satyam343
Analysis: cry

Solution
Code (C++)

1998C - Perform Operations to Maximize Score

Problem Credits: cry, satyam343
Analysis: sum, satyam343, Dominater069

Hint 1
Hint 2
Hint 3
Solution
Code (C++)

1998D - Determine Winning Islands in Race

Problem Credits: cry
Analysis: cry

Solution
Code (C++)

1998E1 - Eliminating Balls With Merging (Easy Version)

Problem Credits: cry, sum, satyam343
Analysis: sum

Solution 1
Code 1 (C++)
Solution 2
Code 2 (C++)

1998E2 - Eliminating Balls With Merging (Hard Version)

Problem Credits: cry, sum, satyam343
Analysis: sum

Solution
Code (C++)

Full text and comments »

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

By cry, 9 months ago, In English

Hellowo Codeforcers :3

sum and I are very delighted, ecstatic, enchanted, euphoric, excited, exultant, jubilant, overjoyed, and proud to invite you to participate in Codeforces Round 952 (Div. 4), which will start on Jun/11/2024 17:35 (Moscow time). There will be $$$8$$$ problems, with one split into two subtasks, to be solved in $$$2.5$$$ hours.

As usual, I have to copy and paste the following...

The format of the event will be identical to Div. 3 rounds:

  • 5-8 tasks;
  • ICPC rules with a penalty of 10 minutes for an incorrect submission;
  • 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
  • after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
  • by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1400 or higher in the rating.

Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), then the round will be rated for you.

We want to express overwhelming gratitude to the following individuals for making the contest possible:

Vladosiya and mesanu for coordinating the contest and reviewing the problems.

Dominater069, omeganot, Phi-001, flamestorm, nskybytskyi, willy108, ScarletS, mark, yuan-shen, vgoofficial, htetgm, buffering, yash_9a3b, haochenkang, ETL, natalina, MatthewC3297, and lcsc0 for testing the round.

MikeMirzayanov for the usual.

We suggest reading all of the problems as we have put mucho effort into all of them. Best of luck, mis amigos!

UPD: Editorial

Full text and comments »

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

By cry, 7 months ago, In English

This was our first time setting a Div.4 contest. We sincerely hope you enjoyed the problems!

1985A - Creating Words

Problem Credits: cry
Analysis: cry

Solution
Code (C++)
1985B - Maximum Multiple Sum

Problem Credits: cry
Analysis: cry

Solution
Code (C++)
1985C - Good Prefixes

Problem Credits: sum
Analysis: cry

Solution
Code (C++)
1985D - Manhattan Circle

Problem Credits: cry
Analysis: cry

Solution
Code (C++)
1985E - Secret Box

Problem Credits: cry
Analysis: cry

Solution
Code (C++)
1985F - Final Boss

Problem Credits: cry, sum
Analysis: cry, sum

About Hacks
Solution
Code (C++)
Bonus
1985G - D-Function

Problem Credits: cry
Analysis: cry

Solution
Code (Python)
1985H1 - Maximize the Largest Component (Easy Version)

Problem Credits: sum
Analysis: sum

Solution
Code (C++)
1985H2 - Maximize the Largest Component (Hard Version)

Problem Credits: sum
Analysis: sum

Solution
Code (C++)

Full text and comments »

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

By cry, 10 months ago, In English

Hello Codeforcers!

We are pleased to invite you to participate in CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!). This round will start on Mar/30/2024 17:35 (Moscow time) and will be rated for all participants. There will be $$$8$$$ problems to be solved in $$$3$$$ hours, with one divided into two subtasks. Similar to USACO, you will help Farmer John and his cows resolve a series of first world problems. Be there or be square.

This round was cooked up by smax, sum, oursaco, cry, and buffering.

We would like to thank the following people for making the round possible:

Score Distribution:

$$$500 - 1000 - (1250 + 750) - 2250 - 2500 - 3000 - 3000 - 4500$$$

Editorial

Congratulations to our Winners and First Solves!

Top 5:

  1. maroonrk

  2. Radewoosh

  3. ecnerwala

  4. cnnfls_csy

  5. orzdevinwang

First Solves:

A. A_G
B. jiangly
C1. ksun48
C2. turmax
D. Omer223
E. tourist
F. Radewoosh
G. tourist
H. ecnerwala

And here is the information from our title sponsor:

Hello, Codeforces!

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

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 8 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 8 and hope you enjoy the contest!

Full text and comments »

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

By cry, 9 months ago, In English

Thank you for participating! We put a lot of effort into this contest. Special thanks to TheScrasse for contributing to these problems.

Rating Predictions

Solutions

1942A - Farmer John's Challenge

Problem Credits: buffering
Analysis: buffering

Hint 1
Hint 2
Hint 3
Solution
Code (C++)
1942B - Bessie and MEX

Problem Credits: buffering
Analysis: buffering

Solution 1

Hint 1
Hint 2
Solution
Code (C++)

Solution 2

Hint 1
Hint 2
Solution
1942C1 - Bessie's Birthday Cake (Easy Version) and 1942C2 - Bessie's Birthday Cake (Hard Version)

Problem Credits: cry
Analysis: cry

Solution (Easy Version)
Solution (Hard Version)
Code (C++)

1942D - Learning to Paint

Problem Credits: sum
Analysis: sum

Hint 1
Hint 2
Solution
Code (C++)

1942E - Farm Game

Problem Credits: cry
Analysis: sum

Hint 1
Hint 2
Hint 3
Solution
Code (C++)

1942F - Farmer John's Favorite Function

Problem Credits: sum
Analysis: sum

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Code (C++)

1942G - Bessie and Cards

Problem Credits: smax
Analysis: smax

Hint 1
Hint 2
Solution
Code (C++)

1942H - Farmer John's Favorite Intern

Problem Credits: oursaco
Analysis: oursaco / rainboy

Solution 1
Code (C++)
Solution 2
Code (C++)

Full text and comments »

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

By cry, 15 months ago, In English

Recently, around daily at around this time (9PM EST), when I try to edit a problem in Polygon I just get greeted with blank screen. The main view problems page seems fine though.

Is polygon just down everyday at this time or is it just me? Do I have too many created problems in my account lol? When I view console it just displays this:

Full text and comments »

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

By cry, 17 months ago, In English

Hello Codeforcers :3

UPD 1: Opening ceremony on Friday 7PM EST. Join our Discord server for more information

UPD 2: Contest has started! You may start your window anytime over the next 2 days. Join our Discord server to ask clarifications for any problems. Good luck!

From the authors behind Codeforces Round 887 (Div. 1) and Codeforces Round 887 (Div. 2), CerealCodes is excited to announce our Summer 2023 Programming Contest!

This contest will be held on August $$$13 - 15$$$ th with a customizable time-frame window. The time limit for novice is $$$3$$$ hours while intermediate and advanced are allowed $$$3.5$$$ hours. All of the contest information, including exact start and end times, can be found here.

The competition has three divisions: Novice (USACO Bronze-Silver or Div. 3), Intermediate (USACO Silver-Gold or Div. 2), and Advanced (USACO Gold-Platinum or Div. 1).

You can form teams of up to $$$3$$$ members, and compete to solve $$$\approx 10$$$ high quality problems within your time frame.

Over $1500 in cash (possibly more) will be given out (in the form of Amazon gift cards), as well as other prizes like merchandise and raffle awards! Note: only pre-college teams are eligible for cash awards, but everyone is still eligible to participate.

Join our Discord server for more info and if you have any questions about the contest before or during the contest.

All of the logistics, registration, and the contest platform will be held on our website.

The problems were invented and written by our problemsetting team: wavelets, Apple_Method, oursaco, omeganot, sum, null_awe, izhang, cry, thehunterjames, Ina, Whimpers, timg8710, buffering, ntarsis30, Cereal2, Alg01, asdf1234coding, dutin, and ArielShehter.

Big thanks to our problem testers as well: EmeraldBlock and GusterGoose27; and our web + contest platform developers: xiaossr, mirachael, SwayamSahoo11742, cryan., br1ck, and _monitor.

Last year's contest can be found here.

Register Here

We hope to see you there!

CerealCodes Team

Full text and comments »

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

By cry, 19 months ago, In English

Hello Codeforcers!

I am pleased to invite y'all to participate in Codeforces Round 887 (Div. 1) and Codeforces Round 887 (Div. 2), which will start on Jul/23/2023 17:35 (Moscow time). In both divisions, you will be given $$$6$$$ problems and $$$2.5$$$ hours to solve them. The Div. $$$2 $$$ round will be rated for participants with rating below $$$1900$$$, while the Div. $$$1$$$ round will be rated for participants with ratings which are at least $$$1900$$$.

This round was authored and prepared by Benq, emorgan, omeganot, US3RN4M3, me (cry), Ina, nsqrtlog, buffering, ntarsis30, and ArielShehter.

We want to thank the following people for their contributions:

UPD 1: Score Distribution

Div. $$$2$$$: $$$500 - 1000 - 1500 - 2000 - 2500 - 3500$$$

Div. $$$1$$$: $$$500 - 750 - 1250 - 2000 - 2250 - 3000$$$

UPD 2: Editorial has been posted here

UPD 3: Congratulations to the winners!

Div.1

  1. jiangly

  2. Rebelz

  3. Radewoosh

  4. tourist

  5. jqdai0815

Div. 2

  1. dmaksym1177

  2. Tmath_OneLove

  3. onufryw

  4. i_nevergive_up

  5. clonegrandmaster

Good luck! Red panda wishes you all rating inflation!

Art credit to xiaossr

Full text and comments »

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

By cry, 19 months ago, In English

We hope you enjoyed these problems :) This contest has been in the works for almost a year.

About the Authors

UPD: D1D Editorial have been updated

UPD 2: D1D Editorial now has images by EmeraldBlock. As an apology gift for being so slow, the image generator is programmatic and available here.

1853A - Desorting

Problem Credits: buffering

Analysis: buffering

Hint 1
Solution
Code (C++)

1853B - Fibonaccharsis

Problem Credits: ntarsis30, cry

Analysis: cry

Hint 1
Solution
Code (C++)

Bonus: Solve for $$$n, k \leq 10^9$$$

Bonus Solution

1852A - Ntarsis' Set

Problem Credits: nsqrtlog

Analysis: nsqrtlog, buffering

Hint 1
Hint 2
Solution
Code (C++) -- Model Solution
Code (C++) -- Simulation (more readable)

1852B - Imbalanced Arrays

Problem Credits: nsqrtlog

Analysis: buffering, nsqrtlog

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Code (C++)

1852C - Ina of the Mountain

Problem Credits: Ina

Analysis: Ina, EmeraldBlock, GusterGoose27

Hint One
Hint 2
Hint 3
Tutorial
Code (C++)

1852D - Miriany and Matchstick

Problem Credits: ArielShehter

Analysis: EmeraldBlock, emorgan

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Code (C++)

1852E - Rivalries

Problem Credits: buffering, ArielShehter, Ina

Analysis: oursaco

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Code (C++)

1852F - Panda Meetups

Problem Credits: Benq

Analysis: Benq, oursaco

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Code (C++)

Full text and comments »

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

By cry, history, 3 years ago, In English

You can now name your variables with emojis in C++20 :D

Proof of C++20 submission: https://mirror.codeforces.com/contest/80/submission/140848199

It does not work in other C++ versions, such as C++17: https://mirror.codeforces.com/contest/80/submission/140847859

This is a revolutionary moment in variable naming, and an incredible breakthrough for the community <3

Full text and comments »

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