Invitation to the Go for Gold April Long Challenge!
Competitive programmers, get ready! The Go for Gold Long Challenge is back with its fourth iteration, bringing another thrilling opportunity to test your problem-solving skills and climb the leaderboard on Codeforces!
We are excited to present yet another round of engaging and challenging problems for the community. Whether you're a seasoned competitor or just starting out, this contest is designed to offer a balanced mix of difficulty levels to help everyone push their limits.
Note: We have shifted the format of the Long Challenge from ICPC-style to IOI-style, which includes subtasks in problems, so that everyone can try all of them.
Contest Details
Please join the codeforces group and register for the contest.
- Start time: Friday, 18 April 2025, 09:30 UTC
- End time: Sunday, 27 April 2025, 06:30 UTC
Why Should You Join?
- Enhance Your Competitive Programming Skills
- Gain Exposure to Unique Problems
- Engage with an Active Community of Programmers
Contributors
All problems are prepared and tested by DeadlyCritic, ili, Enigma27, ludo., OIaspirant2307 and me.
You can join our Discord server for any questions.
We invite you to propose problem ideas for the next rounds. We increased our payment rates recently. Give back to the community. Thanks to ProofByContradiction_, AksLolCoding, GM_Dan4Life, lovewingbell, Muhammad-Ahmad for suggesting ideas for this contest!
The countdown has begun! Mark your calendars and prepare to GoForGold once again. We can’t wait to see your amazing submissions.
Stay tuned for more updates and happy coding!
UPD: Editorial is published.









any prize money?
Excited for the contest :)
Here we go again…
Thanks for accepting my problem!
it feels nice to be in a good codeforces blog :)
The contest has started :)
Problem Statement of B is kind of misleading. In test case two for example you could by leaving out the middle point in the second area achieve a perimeter of 14. I think its supposed to say maximum connected area.
Thanks for pointing out. Yes , the assumption was that you'll have to take the entire connected region and select the one with max perimeter.
Still doesn't seem that clear. What should be the output for:
Is it
26 14which includes perimeter inside, or18 14which doesn'tI think you include the perimeter inside
For clarification of Problem I can we have tutorial please
Is there a way to view the verdict instead of just the score (e.g. WA and TLE)?
Unfortunately, I know no way to do that.
I suspect that there is a problem with the judgement data of problem I, but I have no evidence.
I also have a suspicion
Subtask 1 has sample testcase 2, so solutions that assume $$$l = 1$$$ and $$$r = n$$$ don’t get the full 30 points. I had to hardcode sample TC2 to get 30 points.
As a problem author, hope you enjoy the contest : )
Interested to solve the problems
Contest is over now, so I can share my solution to A (which was my problem). I didn't think the problem was that hard, but it having the least number of solves says otherwise.
The original problem proposal had no duplicate elements (so a solution was always possible), so I will present its solution first.
The key idea is to notice that each element must end up either to the left or to the right of all greater (or equal) elements. We can use an order statistic tree (or range query data structure) to count the number of elements greater than the current element to its left and right, and add the minimum of these counts to the answer.
We now deal with multiple elements. If there are three or more copies of a certain value, then it is obviously impossible. If there are exactly two copies of a value, one copy must go to the left of all greater elements and the other must go to the right. It is optimal to move the rightmost of the two elements to the right and the other to the left. The number of swaps needed for this can also be counted using the data structure in the previous paragraph.
Time complexity: $$$O(n\log{n})$$$