Hello, Codeforces!
We gladly invite you to participate in Codeforces Round 1058 (Div. 1, Div. 2), which will be held on Oct/12/2025 17:35 (Moscow time)! You will be given $$$\mathbf{2.5}$$$ hours to solve $$$\mathbf{6}$$$ or $$$\mathbf{7}$$$ problems (depending on your division). One problem will be divided into two subtasks.
The problems were authored by wuhudsm, Proof_by_QED and chromate00. We have put so much effort (and time) into this contest, and we hope you will enjoy it!
Do note that for both divisions, at least one of the problems will be interactive. So if you are unfamiliar with them, please read the guide for interactive problems and get yourself ready.
Our team would like to thank the following people:
- TheScrasse for coordinating the round and believing in us for such a long time;
- Alexdat2000 for translating statements in this and every other contest;
- cry and sum for earning the "professional relaxer" title by not proposing problems;
- satyam343, BurnedChicken, zeemanz for VIP testing;
- Um_nik for shortly taking a look at the problemset;
- A_G, _istil, sammyuri, fextivity, cadmiumky, Dragos, IBory, szilb, awoo, rhombus, efishel, Intellegent, turska, adamant, beaaaan, spike1236, ArshiaDadras, qwexd, reirugan, rewhile, harshith_04, macaquedev, Edeeva, IvanBorquez, ProofByContradiction_, DivinePunishment, larush, tin.le2, ymwang, Non-origination, SpyrosAliv, and ALnQ417 for testing the problemset and helping us improve it;
- MikeMirzayanov and KAN for great platforms Codeforces and Polygon;
- and last but not least, You for participating!
And now, the score distribution.
Division 1:
| A | B | C | D | E | F |
|---|---|---|---|---|---|
| $$$750$$$ | $$$1500$$$ | $$$1500$$$ | $$$(1500+1750)$$$ | $$$3000$$$ | $$$3500$$$ |
| A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|
| $$$500$$$ | $$$1000$$$ | $$$1250$$$ | $$$1750$$$ | $$$2500$$$ | $$$2500$$$ | $$$(2500+2750)$$$ |
Good luck, and I hope you find enlightment from the problemset!
UPD: Editorial is uploaded here.
Also UPD by chromate00: I sincerely apologize about the weak pretests of problem 1B/2E. I have greatly underestimated the runtime and memory usage of the worst solutions, while still wanting to be generous about slower solutions. This has led to weak tests during contest. Deeply sorry about the bad contest experiences affected by this.








Let's participate and get some — ve delta :(.
As a participant, I will follow :)
No risk, no gain. Once rainboy has said it.
As a participant, I did follow ;>
As a participant, 6-7 problems
As a participant You are not funny
he is 67% funnier than you
im just trying to get lowest contribution ever
you'll never beat this poor guy:Dragmon because of this contest anouncement :(
OMG! i dont understand.
whats wrong with his anouncement ?!
-3711 downvotes...
WHY
Somehow I'm not even trying but I still have less contribution.
Like I don't wanna be on the last dang page of the contribution list for no reason
respect
;-; I wish to not have so much neg contribution
It reminds me of the round when the answers to the samples were 6-digit codes.
As a tester, shaw
As a tester, poshanka!
As a tester, adino
As a participant, garama!
As a participant,I don't know why my rating is droping :(.
As a participant, hegale!
as a participant, adino
As a nobody, na fenestra
As a noob , git gud
I don't see __baozii__. :(
If you could share __baozii__ $$$1$$$ rating he would like to test the round.
When you are forced to thank someone, but really don't want to =)
Well, I was asked to look at one problem and I did exactly that.
from the last 2 contest my rating drop , let see what happen today , its looking a very hard problem today .
As a tester, the contest is excellent — the authors have put in tremendous effort to deliver a great experience. Participation is highly encouraged!
Hoping for the best!
In today's contest I forgot to register And I don't like to create 2 files
So instead of creating 2 files I created an single file with
Void solve Void solve1
And used the one based on question used accordingly
However I realised in rooms if someone saw my code for B and C was visible
So will it get me banned or make the person who copied my code ban
Wrong contest
It was a great contest. Thank you authors for giving effort and time for usssss
Wrong contest
As a tester, I want to participate!!!
As a tester, I love this contest and hope you enjoy it too!
As a participant, I hope to reach CM :)
As a participant, I hope to reach Pupil.
me too :)
As a participant, I hope you live @dreadolisk
Nice graph/progress.
“ One of the authors is personally working on an anti-cheat engine for Competitive Programming contests. If you cheat in this round, there might be a possibility that he might happily use you as training data without your consent. It's not like a 100% probability, but just so you know...”??? ChatGPT 1000?
As a participant, Good luck to Everyone.
Every Cheater Should Cheat in this contest! lol
hope i will comeback to specialist
Bless you
we got this bro
67 mentioned
We NEED to know that sir Um_nik only shortly took a look at the problemset ToT
How many problems...
6-7 problems.
Salam Aleykum
Wa'alaikum Salam
Huge thanks to the authors and testers for preparing this round! The problemset looks challenging and well-balanced — really excited to participate and learn from it!
How did you see the problemset before it appeared in the public domain?
Try CF Submitter : https://marketplace.visualstudio.com/items?itemName=DevXSayan.cf-submitter - Fetch all the problems of a contest inside vscode, run test cases, and submit in one click, all without leaving vscode
As a beginner, I want to participate in this contest.
Wish me luck, I will follow rainboy footsteps in this contest.
As someone who hates cheating on the platform. I believe that using submissions without consent for training a model to detect cheat is not fine but a great initiative
As a tester, I am late.
Rated?
Tomorrow is my 20th birthday. I really hope I can reach LGM tonight.
The contest is in the morning, just letting you know so you don't miss it. Anyway, happy birthday and good luck!
I live in UTC+8, and perhaps we just happen to live on opposite sides of the globe :)
Anyway, thanks!
Must be your IQ that doesn't allow you to remember about existence of countries other than USA.
watching you guys glazing each other makes me think you two are best friends
I am flattered.
Also, not to brag or anything, but my last comment got more |votes| than yours. One more thing I noticed: I was temporarily muted right after that comment, so all of my recent comments at that point got removed. All except for that one. So I wonder if the system doesn't remove comments that high enough rated users have replied to, or if something else was at play here.
I still haven't figured out how to solve D2... but happy birthday to me anyway!
Edit: I finally figured out how to solve D2. It's a nice problem though.
Happy Birthday to you ! And congratulations you have a closer stepping to LGM !
where's the editorial?
Are you high?
Bro thinks he's funny.
sorry guys this post was above the announcement of past contest so i commented on the wrong post. my fault
I hope not to choke on C today
All the best to everyone who are participating
Hey everyone! Before the round starts, I just wanted to say a big thank you to the amazing authors, testers, and coordinators of Codeforces Round 1058 (Div. 1 + Div. 2)! People sometimes forget how much work goes into a single round — the authors spend months (sometimes even years) polishing ideas, fixing edge cases, balancing difficulty, and making sure every problem works smoothly. It’s crazy how much effort goes into something that we get to enjoy in just a couple of hours. Massive respect to them for that Really excited (and a little nervous ) for today’s round. Hoping for a fun problemset, a little rating boost, and maybe — just maybe — my long-awaited promotion to Pupil (then Specialist… and boa boa boa ). Good luck to everyone participating! No matter how it goes, let’s enjoy the contest and appreciate the people who make it possible. See you all on the leaderboard — a happy participant ready to fight with the problems
it's not that deep bruh
It is. You should be really grateful for those who spend months in make just one great problem.
Anyways, best of luck for the contest!
I know this is not the place to write something like this, but I also don't know where else to :)
I think it will be really cool if you can see next to your username what is the estimated place for you in the competition, it will give people a target and give you a little hint if ranking changes takes a while
What are your thoughts? I don't know who you should tag in this @headquarters ?
Good luck tonight!
Let me guess Div2E/Div1B is interactive
unban dvb1r, he isnt cheater
in this round he could up 1900, but he was banned!
check his submuttions, he isnt cheater!
I double checked, I am 99% sure he is cheating
Edit: please read https://mirror.codeforces.com/blog/entry/147270?#comment-1317070
Hi! I am one of friend of dvb1r. He is russian and a lot of people know him in offline. Can you give proof? I know for sure that a man like him won't cheat.
His code looks the same as many others in one of the problems. We are very sure the code was leaked from Telegram or Youtube
give us an example of how to compare its code with the leaked ones
https://mirror.codeforces.com/contest/2160/submission/343387881 https://mirror.codeforces.com/contest/2160/submission/343386713 https://mirror.codeforces.com/contest/2160/submission/343386267 https://mirror.codeforces.com/contest/2160/submission/343374187 https://mirror.codeforces.com/contest/2160/submission/343370713 https://mirror.codeforces.com/contest/2160/submission/343385181
All of these have the exact same logic. Look on submissions of div. 1 C by legitimate users, they are different. The last one is from dvb1r
what... why can't few people solve the task in the same way? maybe I should drop you some photos from my notepad so you could see that I came with that idea on myself?
You know very well you cheated. Don't play the victim card
I have never cheated in my life and this day is not an exclusion, Didn't you notice that none of my contests have been banned till this day? I swear to you that I have written all tasks by myself. I Hate cheaters on codeforces and always hated. But when someone like you ban someone like me instead of real cheaters that's really hilarious
Why couldn't several people write the same idea? You can look at the results of the regional stage of the roi in computer science in Russia. He has good results; he could have easily written this round with such a high score
He almost made it to the final stage of the roi, you can look at the table: https://reg.algocode.ru/
It is called ROI in english btw
Ok I took a second look about your code
Your code looks fine, I was wrong to judge it so fast
There were submissions very early with the same transpose code, but also with ChatGPT comments, and using custom bitset with unsigned long long. I believe that they are all clearly cheating. But I wrongly generalized to the transpose code being the characteristic for ChatGPT / Telegram leaks.
If you are legitimate then I apologize for the oversight.
The third time, he turned out to be not 99% a cheater?
Thank you very much for quick respond and rechecking the submission, Can my submissions be unbanned so I got my CM?
sqwiijqk I apologized and triple checked the submission, what else do you want me to do?
Running a contest is hard. I make mistakes. This is fortunately one of the first times I wrongly accused someone of cheating. You should chill out.
In your 6 examples of "copied" code, only 343386713 and 343386267 are similar enough, and even then, this is not enough for a ban
Why did you do the useless work of checking the packages for cheating yourself if Codeforces has an anti-cheat engine? Thanks to you, several people were temporarily banned, and they couldn't write a proper round because they were banned part of the time. It's better not to make rounds at all than to do them this way.
It's quite strange that you're banning solutions with the same logic. Considering that TL has 4 seconds and 250000*√250000=1e9/8, the idea of transposition comes to mind — it's the first thing that comes to my mind (specifically, I didn't have time to finish writing this idea). However, you said that you were sure that user dvb1r was cheating, and you banned his submissions during the round without waiting for the anti-plagiarism system, even though the only task that you believed he had copied was task E. Why didn't you ban him then https://mirror.codeforces.com/contest/2160/submission/343359600? Yes, during the round, she received an OK verdict and only fell after the end of the contest. Why...
I suppose there is some mistake during system tests, because my submissions weren't tested on them, but testing have ended Proof_by_QED
A person has the right to their own code style, it's not their fault that a neural network uses the same technique
What?? They are completely different, only the idea is the same (this is not surprising), but the implementation is completely different
why? One of them using bits(LOL). We are all just codding like Chinese lmao. It's even impossible to read these codes, where did you find the same logic here.
what is the problem you are talking about? I solved ABC in div1 and they dont need a lot of codding. I know this person offline, he's a schoolboy like me. Russians have the lowest percentage of cheating, in case you didn't know.
did you really just "think" that code looks the same and instantly ban me? I swear I have never cheated in codeforces round and today is not an exclusion
It's just a coincidence. For some reason, none of my friends have ever been banned before, but then you decided to test your new anti-cheat system and two of my friends got banned at once (considering their achievements in official competitions, they can't be cheaters). Don't you think there's a problem with your anti-cheat system?
There's no anti-cheat system being used, all of them are caught by me. I caught hundreds of submissions that looks like this and I requested the Codeforces admin to ban them. If you think such cases can be a coincidence I don't know what to tell you. If I don't catch them now plagiarism check will get them later anyways.
But in Announcement you yourself wrote about the anti-cheat engine.
That part of the announcement wasn't written by me
It's not like the anti-cheat engine is already complete or something
"If I don't catch them now plagiarism check will get them later anyways."
don't you think that then you are doing something useless, and with meager accuracy?
Thank you for your great work in catching cheaters!
Downvoting a person for one false positive that was reverted, and then downvoting a person for cheering on the effort to catch cheaters is ridiculous.
There is a different platform where half the top 25 on the leaderboard (after cheater removal) are cheaters. Codeforces could end up like that without people putting in effort to detect cheaters. I notice that some contests have lots of removals, while others don't, despite the level of cheating probably being constant throughout each contest.
Also, we've seen it many times on this platform where someone gets caught cheating and then claims they didn't cheat, only for people to then investigate and find that it is obvious they cheated. So give proof_by_qed a break, he acknowledged the mistake and corrected the issue.
Why do you ban people based only on your own thoughts? dvb1r is my friend, and I know him well. He's never cheated. Please unban him.
submissions on "watermelon" also look like as many others. but that doesn't mean you should ban it... please unban dvb1r!
Can banned users get a reason for the ban? I believe Maria_Chudinova wasn't cheating, but the account was banned, and the user didn't even know the specific reason.
it seems authors dont like Russians so they are banning. cf-cheater-database shows me that two of the authors are cheaters lol.
I'm dead
Bad contest for me
Why idelness limit on pretest 1? Pls help(NEVER MIND)
https://mirror.codeforces.com/contest/2160/submission/343399848
Here you outputed
cntintgers butibefore it. The judger thought you were to printiintgers.D1 were absolute cinema. Dom with hacks. Rainboy to 4th in last 20 minutes!!!
Appeal to the organizers Please unban dvb1r, he's not a cheater. Why was he banned?
Look at his solutions; there's nothing illegal or copied, all the code is his own. This person has never cheated and has always been committed to the integrity of competitions. We demand the entire community unban our friend. I've been personally following his progress for a long time and know he couldn't have cheated.
Unban dvb1r, he didn't deserve the ban. Check his code manually and see for yourself.
could have been my recent best performance but
integer overflowindiv2B... read input asint32array instead ofint64... aaaaahhhhh!!!!!But still did well and hoping for +ve delta.
same man,same.
what is +ve delta?
oh so it means your rating increased in this contest
+ve deltameans rating increased and you did well in the contest for your rating-ve deltameans rating decreased in this contest--
so it is just
new rating - old ratingwhich is positive (+ve)went very BAD :(
how do you minimize a 2d range quickly.!
interactive problems are a disaster for me.
if it werent for a[i] <= 10^9 in C i would have gotten gm Fuck ts im so pissed off
Fun challenge: solve C (div 1) if all coefficients, including $$$a_0$$$, must be at most $$$n$$$ (this is what I misled myself to believing into)
Huh? but it's true.
(in the sense that the answer is zero if any $$$a_i \gt n$$$)
Isn't the polynomial $$$10 + 5x^5$$$ good?
Ok never mind, I somehow still managed to solve the problem despite making an incorrect assumption ...
(the asssumption is that if $$$a_i=0$$$ then $$$i$$$ is omitted from the summation)
The count still ends up being the same though.
for $$$n = 4$$$ , $$$f(x) = 6x^0 + 4x^4$$$ , satisfies the same.
yeah $$$a[0]$$$ can be greater than $$$n$$$.
I'm not kidding btw, I believe my last submission correctly solves this version, except for a bug I know (although this wouldn't be div1C)
what is the intended complexity for your this version ? (I believe in this case we would need to find subset of size k , with sum <= n ?)
$$$n\log{n}$$$, but maybe with a big constant
UPD: I've realized I had another mistake, which may or may not be fixable
Hello, I made the same mistake during the contest. By the time I realized my error, it was already too late. lol
I can only solve this “wrong” problem in $$$O(n \sqrt n)$$$. Could you share how you solved it in O(n log n)?
My mistake was that I thought that the number of involutions on $$$n$$$ elements satisfied the recurrence relation $$$f(n) = f(n - 1) + f(n - 2)$$$ just because I forgot to finish writing this in my code (and didn't even think about it as something well known). Therefore, I thought, $$$f(n)$$$ is some Fibonacci number. If we extend the field $$$\mathbb{F}_{10^9+7}$$$ with the element $$$i = \sqrt{5}$$$, then each element in the new field $$$\mathbb{F}_{10^9+7}(i)$$$ is represented as $$$a + bi$$$, and the $$$n$$$-th Fibonacci number is something like the "imaginary part" of $$$\varphi^n$$$ where $$$\varphi = \frac{1 + \sqrt{5}}{2}$$$.
Therefore, I thought, if $$$a_1$$$, $$$\ldots$$$, $$$a_k$$$ are the indices where we could place zeroes, then we could find the first $$$n$$$ coefficients of $$$\displaystyle\prod_{i=1}^k(1 + \varphi^{-1}x^{a_i})$$$ and solve the problem from there (by summing some first coefficients of the result and multiplying them by $$$\varphi^{n+1}$$$ or something). That product can be found by first determining its (formal) logarithm, which is done naively in $$$\sum n/a_i = O(n\log n)$$$ and then formal $$$\text{exp}$$$, which is another $$$O(n\log n)$$$.
However, if the number of involutions is not a power of anything cheap, like a field extension element or maybe some matrix, then idk
noooooooo i forgot to check that a_i were <= n for problem f :(
I was able to think of correct solution for A (div. 2) in 5 minutes and it was too obvious.. I was like are the authors trying to troll.. then I went on looking for a proof and voila 20 minutes gone.. and what did I find out? my instinct was right.. I am so dumb
LOLOL!!!
was ur instict.. mex of whole array is the answer ??
yeah lol
Yeah I did the same lol. Got the solution in 2 min, but spent another 10 min thinking it was submission bait and trying to prove if it really is the correct solution.
The proof appears even before the solution. Just coalesce the valid partition, mex is same.
Subtle foreshadowing:
Cool C! $$$a_0$$$ brings some extra cases that seem a bit artificial but it probably makes the problem less OEIS-able.
I dont understand the reason for having 25e4 in B instead of 1e5 because, well, it is $$$O(n\cdot m \cdot \min(n, m))$$$ anyway, right? And kind of the same memory, clear that constant factor is bad. For me sets werent working on the go so i had to do some stupid rewrites for 20 mins.
What is D1? Problem looks like a classic "dp with super-dooper search" (have records list, recalc dp over first K, last K and random K elements), but doesnt seem to fit (i tried!). Some submissions seem to do some searches (i tried ternary, doesnt work).
You can only leave elements that are less than all after them, the answer won't change.
After that, one can show that there is a solution where each cost is at most $$$3$$$.
First spoiler I agree, did the same. Second I can believe that the cost is small but 3 seems like a magic number. Will wait for the editorial
if a segment has cost $$$a\geq 4$$$, then you can split it into a segment of cost at most $$$2$$$ and a segment of cost at most $$$\lceil a/2 \rceil$$$
The upperbound $$$60$$$ is rather easy-understandable, my solution is $$$O(60n)$$$ and works just fine
why is there Idleness Limit on test1 div2 problem D? I tried endl, fflush(stdout), cout.flush() and none of it worked also tried combining it https://mirror.codeforces.com/contest/2160/submission/343400658
I think it's the space after the last number in the query, that shouldn't be there
found mistake, didn't print "k" (indxs count) after "?"
((((((
I made the same mistake as you. It's just annoying...
Good round, good problems.
ok, now let's wait for more and more FSTs rising in 1B/2E
How to solve Div2 D? What's wrong with my submission 343369699?
You do 4n queries, to bring it down to 3n you can change the second run to query all indexes you found during the first run + one that's still unknown
And I thought I am only querying 2n times. Lol, what a funny blunder. Guess that's what a year long break from CF does to you.
Anyways, thanks for pointing out my mistake
you have to ignore some indices while reverse way
like if array is
1 1 2 2in first way you will figure
? 1 ? 2in2nqueriesbut reverse way also you make
2nqueries.. which is4n.. but only3nqueries allowedyou have to skip indices you have figured in first passes like in this case you should query only
1 and 2while coming backis there some cool Data structure ( maybe segment tree stuff ) based answer for
div2E..minimum enclosing rectangleproblem ?I did some complicated range storing things in every row and then kind of traverse backwards to accumulate their effects.. but got stuck in implementation and couldn't reach correct final answer ..although with my storage I might MLE
I guess you could use 2d lazy segment tree for range min updates but I think that would TLE
ok thanks...
then what I was doing will also TLE I guess LOLOL !!! ..
i was doing
smaller dimension ^ 2 * log (smaller dimension)I guessoooh!!! it seems there is a smarter way to solve it.
From what I understand from your explanation it should be $$$O(n\cdot m\cdot min(n,m))$$$
I guess poor implementation from me... sorry for the confusion.
I kind of stored ranges for every row ( rows are maximum dimension)
and while coming back I am merging ranges from previous rows and then sorting ( using a set ) so that I can traverse in one direction in that set to updated affect cells in current row
Is hack case on Div.1 B added to system test?
d is genuinely the coolest interactive problem i have ever seen
you should try the probabilistic one from a div3 by chromate.
try 2129C2 - Interactive RBS (Medium Version)
yeah it was fun to solve , i could have completed this que in the contest itself had i not wasted so much time on div2 b aghh!!
Does the system test for problem B include the largest case — that is, H = W = 500 and all G_{i, j} = 1?
When I tested it locally, it took quite a long time, but the system test ran very quickly, so I’m curious.
I think quite a few people might get TLE on this.
By reviewing the submissions of the contestants, it can be found that the hack was only tested after 23:21(UTC+8) at the beginning
They added the hacks but it was only tested for people who submitted after 46 min of contest because they forgot to build the package :D. Apparently they'll rejudge later.
Allegedly n = m = 500 wasnt included on pretests
n=m=500 was included but not the grid completely filled with 1's, which seems like the hack
valid crashout
I'm wondering the round will become the one with the most FSTs in 2025 because of the pretest of d1B.
What is FST?
Failed system tests. Essentially, during the contest, they don't test your solution on all possible tests, and they save some for after the contest. If a solution passed the pre-tests but fails on the after round tests, it's considered an FST
Exactly.
I can't image that there will be a problem with weaker pretests in the next 3 months.
Good contest for me :)
Thanks for the amazing problems. Hoping to solve div2E on my own.
Div2E, number of FST > number of Accepted
:(first time failing system tests :(
Why doesn’t the pretest for Div.1 B include the extreme case of a 500×500 grid filled with 1? Why are the samples for Div.1 C so weak?
ig everyone who failed on system tests should blame the Div.1 B problem setter for the test data, not the hackers.
While I agree it is a case that should not have been omitted, I am seeing many lazy segtree solutions that would clearly fail with this test case in mind, so I don't think it is fair to fully blame the setters
Why do you think so? I don't think there's a connection
Why do so many people downvote me? I agree with hoks' viewpoint and disagree with IceSerpent's viewpoint.
I just read the Editorial
It seems that the official (Div.1B) solution uses an algorithm with space complexity $$$O(nm\sqrt{nm})$$$ — while the version with $$$O(nm)$$$ space complexity is left as an exercise for the reader.
Many contestants implemented the ( $$$O(nm\sqrt{nm})$$$ ) version and got hacked, possibly even the official solution’s memory usage cannot handle the extreme case containing a 500×500 block of 1s.
Yeah, it’s pretty funny, isn’t it?
the problem C Div2 statement was very bad. where i understand the inverse of the bitmask of the number as reverse each 1's to 0's and the vise versa. until see the message that refer that the reverse mean reverse the order of digits. i think if it was more accurate i will solve it very faster!
I can understand your point !!!
but what would question mean in that case .. you can only make
1111....111with that definition ofreverseright ??Zeyad_Ammar Well, how do you reverse an array of integers $$$[1, 3, 6, 8]$$$?
And when the problem says, let "$$$f(x)$$$ be the positive integer formed by reversing the binary representation of $$$x$$$ without leading zeroes", what should that mean?
Also, if you ACTUALLY thought what you meant, then $$$x \oplus f(x)$$$ would always be a number of $$$111....11$$$ (number of bits in $$$x$$$), so unless the number $$$n$$$ consists of all $$$1$$$, it's immediately "NO", and "YES" otherwise. Clearly that should not be the problem which is solvable in 2 minutes.
Having said that, I agree that authors could have picked a different $$$x$$$ for the example. But then again, they didn't expect anyone to misinterpret the word "reverse", and I can't blame them. It was pretty obvious, I'm afraid.
How was even a basic n=m=500 all 1 test not added to 1B pretests?
Did the author make a mistake in the generator of 1B/2E?? I can't understand what he wanted by generating the data with so many 0s...
If I am not mistaken, there are probably around $$$\min(n,m)^{1.5}$$$ rectangles in that grid. It is just not visible due to the many rows of $0$s. Deeply apologize about the weak pretests though, I wanted to be generous with slower (and more space-consuming) solutions, and I thought the solutions we really wanted to kill would already die from random tests.
Thanks, and sorry for my misunderstanding.
The problem itself is fun (for me personally) and I like it and the problemset, although I got ML on B while having twice less memory on the pretests, that was unexpected =/
I think problem B should have more memory or be way smaller than 1024 mb. I thought that $$$O(n*m*min(n,m))$$$ would fit in 1024mb (and it almost does), and that was the reason for 1024 — it didn't make any other sense to me.
Most solutions that got MLE probably get AC for 200-500mb more (or a few constant optimizations).
Well, the problem is that the max test wasn't at the pretests, so the MLE could be not seen during the contest. If the ML could be changed now — well, may be some solutions (including my own) could pass the tests. Still, the same problem is with TLE etc., so the main cause is the max test being absent in the pretests.
Changing few ints to short ints makes $$$O(n*m*min(n,m))$$$ pass.
This problem with the current setup is absurd to me.
Anyways, congrats to all of you who thought of MLE (even though it's so high) and made constant optimizations :)
Fun fact — I got 1.4s and 405Mb on pretests, that is more than two times less than the limits, still getting the ML on full tests. I am interested — is it OK, will the round be rated and / or the limits for the problem B — changed?
Passed the pretests on div 2 E but got TLE on system testing :(
Me too. My program even passed the test case with n=m=500 and all ones locally, so I was a bit sad when I saw that it failed in the system test :(
Can someone explain the logic behind div2B?
so editorial is out for this contest already, you can check the official solution there ...
sorry if you already saw the editorial
Thanks for telling me. it wasn’t showing up when I commented.
I got wa on test 21 on 1C. could anyone help?
submission
Your code accesses f[cund], but when n=4e5, cund can be 4e5+1.
But the array f is filled up to 4e5, so there's no value in f[4e5+1].
thank u so much!!
Can someone tell solution for Div2E? I have tried using segment tree to update the minimum areas of ranges and at last computed for every element. It takes O(n^2*m*log(n^2)) for n<=m and fails on test 24.
I got kind of trolled in 1C because I thought polynomials of degree $$$n$$$ were also polynomials of degree $$$n + 1$$$, and panicked at the end upon realizing I had to force $$$a_n$$$ to be nonzero :(
Edit: I realize it's in the problem statement but I probably read it more sloppily than usual because I had to take a shit LOL, and I don't think I ever read the beginning of the problem statement again after returning from the toilet
Edit2: And the reason I had to take a shit despite shitting before bed last night is probably due to eating a massive cheesesteak hero for lunch yesterday. It wasn't even that good by cheesesteak standards imo...
I have a doubt in Problem C
Here is my code
This code got Accepted.
But in the loop
for(ll bit=0;bit<32;bit++)if i change it tofor(ll bit=0;bit<=32;bit++)this is giving me wrong output. Can any one explain why?Accepted: 343408321 Wrong Answer: 343409594 Difference: Screenshot
Out-of-Bounds Indexing for bitset<32>
for(ll bit=0;bit<=32;bit++)
this tries to access bit[32] but you declare bitset<32>.. array indexes from 0-31,, bit[32] doesn't exist.. "Out of bounds"
Why is there another system test? Have up-hacks been added?
We are looking into this with admins.
It seems correct now. Thank you and the other admins for your work.
My code got rejudged again and TLE after the announcement of "The system testing and rejudges are done."????
Please give me a reason for this chromate00
We are looking into this with admins. Probably a package was built during rejudge and some submissions got rejudged on uphack tests. Do not worry, it may take some time, but the in-contest submissions' verdicts will not be based on uphack data after it gets fixed.
In Div2 C What is the valid x for n=13 Because I couldn't find any but in the testcases it says YES for n=13
13 is NO. If you mean testcase#2, it begins from zero. So try count again?
got wa on A just due by not reading problem correctly, I thought that it was written array is sorted already in input, as when it isn't sorted it is not mentioned generally in problems, well I am noob too
It reminds us that we can't be too careful in competitions? Anyway it's just a round rather than some World Final, so don't be upset :)
Where rating?
is it rated?
Can I reverse 01000 and get 00010? For the problem div2C? chromate00
No ($$$f(x)$$$ doesn't consider leading zeroes of $$$x$$$)
Bruh then n=10, is there any valid x?
And which is that?
Yes, $$$x=11001_2=25$$$, $$$f(x)=10011_2=19$$$, $$$x \oplus f(x) = 25 \oplus 19 = 10$$$
Great contest! Achieved my first live hack (used the 500x500 all 1s test case) which was really exciting. All that hacking practice in educational/3/4 rounds is starting to pay off!
I misunderstood div2 D and thought we had to query a range of indices..
gotta say i really liked this contest , a really mind changing problem set indeed.
THE pretest of Div2E is so weak.
yo guys what's contribution and can you help me to increase it?
Someone please explain to me this , i am new to codeforces . I could only solve 2A yesterday ,and it passed all the prestests . But now it shows my solution was not accepted .
System tests and pretests are different. Passing the pretests doesn't necessarily mean you'll pass the system tests.
Sorry but i saw div 1 final standings by mistake . my code was accepted
As a participate, I will follow it.
unban joacru, he isnt cheater He has never cheated, but he was banned! Check his submissions! Proof_by_QED
Please unban joacru. He's my teammate at ICPC, he's never cheated. He teaches competitive programming in our city. Proof_by_QED you can see on his account that he's been competing for many years. Joacru's profile on OII: https://www.iberoinformatica.org/contestant_details/7305
Upvoted for further investigation. Looks like another false positive to me.
I have contacted the codeforces admin regarding this
Can you share any metrics on how many people got caught from cheating, both through automated methods and your manual review?
There's no automated methods used during the round. All submissions are flagged by me and reviewed by a Codeforces administrator before their account is banned.
why this announcement has so many dislikes? could anyone please explain?
Pretests for Div2E and Div1B were weak, so a huge chunk of the solutions failed the system tests even though their solution worked fine on the pre-tests (e.g my solution was 2200ms on pretests, but TLEd on system tests). I'd also argue that time constraints should have been higher, but that's just me being petty.
joacru was unfairly banned. He teaches competitive programming in my city. Check his submissions! Proof_by_QED
i cheated pls ban me
The div1B situation is indeed unfortunate. But I bet this announcement would have a lot less down votes if everyone experienced setting a problem before. I ask that the people carrying this platform please be cut some slack.
I bet this announcement would have a lot less down votes if everyone experienced participating in CNOI contests before.
Hello, I received a plagiarism warning for submissions KingSlayer073008/343311217 and anujgupta0ag/343309726. . Both of these accounts — Anuj.g and anujgupta0ag — belong to me. I accidentally submitted the same code from both accounts while testing, without realizing it violates Codeforces rules. There was no code sharing with anyone else. I understand the mistake and will only use one account (Anuj.g) for all future contests. Kindly remove or ignore the submission from (anujgupta0ag). Thank you for understanding.
Hello, I received a plagiarism warning for submissions KingSlayer073008/343311217 and anujgupta0ag/343309726. Both of these accounts belong to me — I accidentally submitted the same code from both accounts while testing, without realizing it violates Codeforces rules. I understand this was my mistake, and I will use only one account (Anuj.g) for future contests. Please note that Anuj.g is my main account; kindly restore or un-skip that submission, and feel free to ignore/remove the one from anujgupta0ag. Thank you for understanding.
Dear Codeforces Administrators, I would like to clarify regarding the similarity notice between my submission 343363815 and the other submission 343367473 .
I did not share my code with anyone, nor did I copy from any source. I wrote my own solution during the contest. However, I used an online compiler Ideone for testing, and I recently learned that such platforms can make submitted code publicly accessible by default. This might have unintentionally caused the similarity.
I take full responsibility for my own actions and will ensure that I use a local or private environment for future contests to avoid any unintentional code exposure.
Thank you for your time and understanding.
Attention! Your solution 343343452 for the problem 2160A significantly coincides with solutions aditya_padhi/343342157, aditya-233/343343452. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://mirror.codeforces.com/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.
Both accounts belong to me, I am a beginner so I don't know if it's allowed to use 2 accounts at in 1 contest, I may be wrong but this isn't cheating as I wrote code and submitted from both accounts. I will make sure this never happens again
Please remove all warnings on my account, I will make sure i will not repeat this mistakes Thanks for letting me know.
Why would you think it's okay to use two different accounts in the same contest? Under that situation, why would codeforces penalize WA/TLE if one could just submit on burner account first to test solution out?
You can check that I didn't use 1 account to test solution, if that's true then 1 account submission should be wrong right??
I just wanted to push 2 accounts just to flex on friends, and what's more easier way then solving and submitting the same problem...
I am extremely sorry to take such a easy way and I can assure you I will not repeat this in future
If I do so feel free to suspend me, everyone deserves 1 chance to correct their mistakes...
Bro the announcements clearly states to not do this kind of things. Also while registering it asks you to confirm to follow those rules. I guess you should be more careful.
Yeah i get it now
You should have got a ban. Due to CF rules. lol
Dear Codeforces Team,
I am writing to formally appeal the violation against my submission 343337662 for problem 2160C.
After receiving the notification, I conducted my own investigation and made contact with the user involved. They confessed to me that they had gained access to my account and copied my solution specifically to submit it early and "go to sleep," without my knowledge or consent.
Given that I am the original author of the code and the victim of unauthorized access, I respectfully request that the violation be removed from my record. Thank you for your time and consideration.
Dear Codeforces Team,
I am writing to formally appeal the violation against my submission 343337662 for problem 2160C.
10.12, during the programming competition, I made a decision that I am deeply ashamed of.
It was very late, and I was extremely tired. My only thought was to finish the competition quickly so I could go to sleep. For the final problem, I load in "liuzeyu666"'s account for his code of this question. Knowing it was wrong, I gave in to temptation and copied their solution, solely to submit my entry faster and get some rest.
This action was a complete violation of the competition's spirit of fairness and the very purpose of learning. True growth comes from the independent struggle and effort to solve problems, yet I chose the easiest and most dishonest path. This was not only disrespectful to the other participants but also a profound disservice to myself.
This experience has been a significant wake-up call for me. There are no shortcuts to improving one's technical skills; honesty and hard work are the only true foundations for progress. I have learned a difficult but vital lesson and I promise that in all future endeavors, no matter how tired or pressed for time I am, I will uphold the principles of academic integrity and prove myself through my own abilities.
Dear Codeforces Team,
I recently received a notice stating that my submission (ID: 343381641) for problem 2160C coincides with other solutions. I would like to clarify that during the practice session, I referred to my own earlier solution to Problem 1915F, which has a similar logic and structure. That code was written for learning purposes based on the official Codeforces editorial, not from any external or unauthorized source.
The similarity likely arose because both problems share a comparable idea, and I adapted parts of my earlier code while solving 2160C in practice mode. I had no intention to violate any Codeforces rules or share my code publicly. Thank you for your understanding.
How to arrive at 1900?
作者应该不用脚造数据
guys is haveOlogntime a cheater, he has 3 skipped contests he ranked 20th in div 2, more recently he did question G a 3100 rated question in the last global round which was chat gptable, i doubt someone with less than 2000 rating can solve a 3100 rated question in a contest time frame as the probability is very low.(he has less than 7 2700+ solved in practice) his code does not look ai by the looks of it but i still find it very suspicious because anyone else would have contested the skip if they had genuinely done it. wanted to see how other people feel about this.