Codeforces!
Codeforces! Proof_by_QED, chromate00, larush, Edeeva, and I would like to invite you to participate in Codeforces Round 1003 (Div. 4), starting on 09.02.2025 17:35 (Московское время). We have baked $$$8$$$ problems to be solved in $$$2$$$ hours and $$$15$$$ minutes. We hope the problems will be interesting, unique...and skibidi.
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.
Large text, to get your attention for the following:
PLEASE NOTE the rule restricting AI use. If you are caught using AI in an unorthodox manner, either by us manually or detected automatically, YOUR ACCOUNT WILL BE TERMINATED. We will be actively scouring submissions and terminating rulebreakers.
Anyways, I would like to orz the following:
Vladosiya for coordinating.
Our growing family of testuwuers: [VIP] Dominater069, Error_Yuan, amoeba4, Intellegent, [VIP] Friedrich, temporary1, efishel, 18o3, -firefly-, __baozii__, monadtransformer, Sacharlemagne, Lilypad, kevlu8, Filikec, [VIP-] macaquedev, beaten_by_ai, mathtsai, DivinePunishment, pianapolataa, reirugan, and pop.
MikeMirzayanov for running this site for 15 years. 15 years ago, I was still eating crayons.








Participate for a fumo.
Oh cry also play Honkai : Star Rail.
Don't you know cry has made multiple problem based on hsr?
That's why Round 971 F/G?
As a
testerproblemsetter, I really don't know how eating crayons affected cry's problemsetting skillsAs a tester, I'm thankful to the crayons for affecting cry's problemsetting skills, because I don't think we would have gotten such a skibidi round otherwise.
i love cryons
As a tester, this round was quite skibidi.
when is the next rollback?
As an author, instead of eating crayons 15 years ago, I ate snacks from the floor 10 years ago.
As a tester, I still eat snacks from the floor.
As a testuwuer, this is my first time testing a round! Hope everyone enjoy the problems.
uwu
As a tester, I am sure this round will be not only skibidi, but suspicious as well.
Chatgpt o3 mini was able to solve all problems of a recent div4 which I tried. I hope problems after D are non ChatGPTable since your rounds are more towards the standard side cry
I would advise you to not focus on whether problems are GPTable or not, and focus more on enjoying the problems. Best of luck!
o3 mini COMPLETELY solves Codeforces Round 962 (Div. 3) and its a Division 3 contest. If you haven't taken any special care then sim pretty sure first page of standings will just be cheaters considering this is a Division 4 contest.
So what is the point of saying all of this? Are you planning on cheating? We have already said in the announcement that any accounts suspected of using AI will be banned, either by us or by plagiarism checker after the contest.
I don't cheat and if the problems are not gpt proof it will be impossible to catch if someone implements the code of ai on their own.
Why would I cheat I'm asking you to make problems non gptable.
Personally, I would far prefer a problem that's 10% more fun/interesting but GPT'able than a problem that's less interesting but GPT-proof. Whether people cheat or not is not my concern. I imagine most people in the community feel this way — why should we sacrifice our enjoyment just because other people want to cheat?
Of course, in an ideal world, the problems would be both interesting and GPT-proof. But problem setting is hard. I've tried coming up with problems in my spare time, and I've come up with nothing remotely passable. If you think you can do it, then go ahead and try. If you think cry's rounds are unsuitable, then don't compete in them. But don't just expect setters to be able to magically produce perfect problems that are both enjoyable to solve and perfectly GPT-proof.
Completely agree with this. To be honest, I think whether a problem can be solved by AI should be the last concern. It has already become too difficult to make only problems that are GPT-proof, especially when the problems are supposed to be easy, and in a near future it will be almost impossible even to make GPT-proof Div. 2 problems. I don't want problemsetters to suffer from interesting problems being rejected just because of this. It's only our job to improve general conciousness on cheating and contest writers should be free from such burdens.
we want to become a CM and Master to have a feeling that i have achieved something big (without cheating) and want to show in industry that we are capable of high logical thinking for jobs (without cheating) but because of cheating we are unable to achieve this as rating based on rank.....so how Whether people cheat or not is not our concern.
Nobody cares about your codeforces ranking mate.
There are less than 3000 Masters on this site. Do you really think being a master will get a you job? If anything, if it's the only thing you are doing, it'll just make you even more unemployable. Unless you wanna be support/mentor for TLE Eliminators LOL.
Your job won't require high logical thinking anyway ,you are just going to build CRUD apps.
Stop worrying about the cheaters, stop putting your self worth — your job prospects — your percieved intelligence — whatever behind a useless number.
If you like CF, if you like math, if you like solving puzzles, so be it. Solve some problems. Don't go on a wild goose chase, looking for an unattainable goal.
But i digress, monkey brain sees big number, monkey brain likes. Monkey brain gets the big number without effort thanks to AI? Monkey brain doesn't feel anything. So yeah, I too don't understand the motive behind cheating here. If it's really the job prospects, I think they might be literally retarded.
Also unrelated, a simple fix is jsut to have a registered phone number to be able to join contests. It's just gonna deter so many...uhm...people. See how I posted this from a fake account, just because I can.
For a 3rd tier college student in India CP is the only(or 1 one of very less) way to get in big product base giant..... No matter whether you have to build crud app only in jobs.....if you have only experience in building a crud app with a 3rd tier college tag even your resume donnot get shortlisted offcampus..... Only a 3rd tier college student with dream of getting into tech giant know what these tag of master and CM mean to them and how this is their only way to shadow there 3rd tier college in resume to get their resume shortlisted in tech giant like google, Microsoft, atlassian etc
if reaching CM was only way to get job then why are there so few CMs in India(means there is only few people who are employable)?
i like cp
This exact line of thinking will ALWAYS keep you down in life.
Lets do some quick math, as we all love it here. There are a total 4421 Indians that have more than 1400 rating, which is the floor for Specialist. (not EXPERT, not CM, nor Master, mind you). Lets say 1/3rd of them are T3 collage students/grads. That leaves ~1500. Say, half of them are already employed. Leaves us 750. Are you seriously telling me that, in the country with 1e9 population, you have only 750 competitors? What an awesome thing is that. (by my metric, by yours its even more laughable) You see, there is a contradiction here. Because if what you said is true, you couldn't possibly be unemployed, right?
Stop projecting the blame into irrelevent things. I design industrial fire suppression systems in my day job. If I can get to 1400 (not a CS major, not a Math major, a plain engineer), shame on you if you cannot with some practice, cheaters or otherwise.
My friend, you need a change of perspective on life.
My suggestion for you is, follow the teachings of Marcus Aurelius. A bit of stoicisim never hurt anyone. Or, you might join the cheater crew, if you think that helps your chances. (I assume it wont though, just seeing the numbers) Last option is, you can do nothing except complain, complain about cheaters, complain about your university, complain about your grades, complain about Milky Way..Maybe life would be better if you were just born in some planet at Andromeda galaxy. Who knows...
Once again for the last time, stop projecting. Take responsibility, only then you can have control over your life. Nobody can teach you how to get a job at a tech giant but one thing is crystal clear enough, it's not about your CF rank.
Very honestly no one gives a shit about codeforces rating except for HFTs which ofc wouldnt hire you unless you are atleast a master.... If you want a job, start building projects, write papers, do internships or solve questions on leetcode. You are wasting your time if you if you think that codeforces would get you a job. Do codeforces only if you are really into problem solving and find it relaxing/fun.
what the hecklers
Yes, there are people like you, who do Codeforces because they want a high rating, because they want to be more employable. Yes, people like you are hurt by cheating.
But at the end of the day, we can't cater this platform to everybody. If I had to choose between catering the platform to people like you, and people like me (i.e. people who do this as a hobby purely for enjoyment), I would pick the latter every time. The CP community is primarily built upon the people who do it because they love it, not the people who just want a job. If people like you suffer from this, it's unfortunate but it is what it is. Go do LeetCode instead or something.
Edit: Just to be clear, I'm not saying I don't care about ratings, nor that people in general should not care about their ratings. Of course that's part of the competition. But the rating scale still holds among non-cheaters, regardless of whether other people are cheating. It's not as if ratings are entirely meaningless, so long as you're comparing yourself to the innocent populace.
atleast last 4 problems shouldnt be gptable
As a testuwuer, I can confirm that there are at least 8 problems and no more than 8 problems that need inputing and outputing.
as a tester, i lost an ungodly amount of braincells reading the problem statements. best of luck
I started grinding IELTS for codeforces rounds.
first time I will be out of competition ;)
Mee tooo (I'll try to ak it)
good luck
Same :v
cry made me addicted to crayons
Can any tester tell me how many problems I can do or how many problems are of a newbie level
who has done 2 problems in div . 1 + 2 and 3 problems in div . 4 .
For obvious reasons, they can't say that, but my estimate would be a newbie could 3-4 problems
As a newly-ordained [VIP-] testuwuer — I assert that if you do not participate in this skibidi sigma round, the gang of testuwuers will fanum tax you out of existence and send you to the depths of Ohio.
As a participant, I love the AI restriction rule
As a tester, the round is more skibidi than anything I've seen before
As a tester, I promise that all problems are good! Have fun!
cry will make us "cry" this time ...
Don't worried, this is Div 4, all problems are easy
will there be a 2700 rated problem this round?
I hope so
This is Div 4, that's impossible!
2009G3 - Yunli's Subarray Queries (extreme version)
Hope to reach specialist
First time the round is rated for me, but I'm not a trusted participant.
Really wanted to participate, but can't.
BdOI (Bangladesh Olympiad in Informatics) preli in the that day :sob:
As a participant, i wish everyone a positive delta
as a tester
why are all testers>= blue for a div 4 :(
are rule restricting AI use also hold for unrated participant?
yes
i hope that someday i test some contest .
As a tester, I can confirm I didn't eat crayons 15 years ago, because I didn't have one.
Planned post contest discussion
I wish I don't need this in this contest(in a good way).
Finally unrated
Congratulations, it's a good way.
What is the penalty for resubmission?
There is no penalty for resubmission in Extended ICPC format.
skibidi
Here only because larush gaslighted me (in a good way) to be here.
If there is no problem about the Super Bowl I will cry.
cry Proof_by_QED can i use AI for testing during the contest because this contest is unrated for me.
No.
does the . means periodt?
Is yes, Proof_by_QED slayyyy queen.
hopefully i don't mess this up :pray:
Dear Server Gods,
Please don't crash out in Ohio and lemme skibidi smash this contest!
Thanks, Your G
Hoping to AK this one !!
I can proudly announce that I am out of competition Thank You
Why cry can write div4 every time?
GLHF
specialist after this one, less go
as the kids say, I wanna unalive myself (in minecraft) after reading (and solving) this round problems' legends.
I have a question: How many hours have authors been watching brainrot content?
E's explanation please
Consider a String with k 0s at the begin, then alternating 1010... then the rest of the string 1s. This is allways constructable if n>=m.
Else we just switch all 1s to 0s and vice versa.
In my opinion, today's problem set is too hard for a Div 4; I would say it is apparently closer to a Div 3 one.
I wonder how the coordinators nowadays determine if a contest should be Div 3 or 4 (open for discussions). Are we labeling a contest as Div 4 just to attract more registrants?
A too-hard Div 4 could discourage complete beginners from joining the CP community. As a personal suggestion, maybe only mark contests with significantly easier problems as Div 4 in the future.
I think it is too hard for div.4 too. As an expert, I cannot even be rated on div.3, and I expect I can AK div.4 or at least only not solve the last question. However, I could only solve 7 questions, and questions beyond A and B are quite stressful for me.
I cannot get an idea of algorithm of F, and for H, not even adding the queries is already quite difficult. H feels like 2200 rating, which is way too difficult for div.4.
So many green/gray talents
Thank you for the problems!
Overall interesting contest. Not really what I expected out of a div 4. Problem order is a bit weird. I couldn't solve C1 or C2 despite solving D and E.
Amazing how the front page is filled with pupils/newbies with consistent 10k performances, but AK in 1h 15...
Bro Thinks He's Him...
What optimization am I missing in F ? 305341654 Keep getting TLE for testcase 16
A path with a majority element can be made shorter, so that there is a smaller subpath as {a[i], a[j], a[i]}
So we need to check only if there are any neigbour vertices with same a[i], or any parent with two childs with same a[i].
Use a set to check if a[k2] is in adj[k1]. I implemented this: 305334519
Yeah ok, I found why I could get TLE. I failed the correct implementation. Pissed, cause I had the idea
Actually you iterate all paths of len 3. That can be a lot. Think about a center vertex, and all others attached to it.
is there a way to solve b without using stack?
if there is at least one pair the answer is 1 because you can always make new pair using the new character
In the original string, if there is not a doubled letter, then no operation can be performed. Else, you can always replace it by any of the neighbouring letters and allow for a further operation to be performed. Eventually, the string size will always reach 1.
Yes, the answer is simply 1 if there are 2 adjacent characters that are the same, otherwise, it is the size of the string.
305337533
can anyone say me why this doesnt work for C1?? if i run it in vs code it passes the testcases but when i submitted it is showing runtime error.
the type of
solfunction should bevoidnotintI think this is the problem with your code (I saw this error before in a friend's code)
How on the earth this is a div4 round?? C2 is a div2C category problem.
C2 was the same as C1 once you got the idea for C1. Just needed to apply binary search to optimize the condition you found in C1
Did you take a look at D and E? Testers and authors know that C2 was harder than them, but since C was subtasked they should be together
I submitted f problem 5 sec before end ,but due to server issue it isnt submitted.Its not my fault ,also this is not the 1st time it happned , plz do something about system
how to do H
Didn't have time to submit the solution, but I guess you have to consider the individual contribution to the total sum by each element. Basically, every element adds 1 to the total sum, if his left neghbour is [empty] or the opposite of the current element. So for each element you have to count the quantity of all subsequences that satisfy the condition above.
bro i did not even think it like that! thanks for the hint, i was thinking something else entirely.
How to solve E?
Simple greedy case for -1 abs(c0-c1)>k or max(c1,c0)< k Else if c1>c0 then first k element is 1 then 01010.. 000 If c0>c1 vice versa
This is my wrong ans for E Wrong Sol. and i just corrected it to max(n, m) < k then also no answer and it passed :) Correct Solution. I now want to cry more hard.
E is stand for Evil, I add k > max(n, m) -> -1 then accepted... (same mistake as you)
Silly indeed.
guys, can you help me? I solve c2 with binary search and greedy algorithm, but i got wrong answer. I go through each element from 1 to n and find with binary search the best j element of b array, for which b[j] — a[i] >= a[i-1] and where difference between a[i] and a[i-1] smallest. What is my mistake?
i would recommend learning about lower_bound() and upper_bound() in stl, it helps a lot not having to write binary search everytime. Although you should understand it well anyway.
what is the prove that sorting the arrays by the sum of its elements in descending order is the right answer for problem D ?
let's say one of a arrays is $$$[a, b, c, d]$$$
now, no matter where is array is concatenated it will be multiplied by some factor say $$$x$$$ in this format => $$$x*a + (x-1)*b + (x-2)*c + (x-3)*d$$$
which evaluates to
$$$(a+b+c+d)*x - 0*a - 1*b - 2*c - 3*d$$$
we just have to choose the best possible values of $$$[a,b,c,d...]$$$ for some arbitrary $$$x$$$ which maximizes this sum, if we choose $$$x = m$$$ and calculate two terms first = $$$a+b+c+d$$$ and second = $$$-0*a - 1*b - 2*c - 3*d$$$ then sorting all arrays with respect to their first and second by following the rule that first should be in descending order and second should also be in descending order then we can get the best ordering of the arrays.
so the authors really said "let the brain rot spread"? xD
Really? You decide to use terms like "amogus", "skibidi", "ohio", "rizz" in the problems? Reading the problem statements was a terrible experience for this division.
Brainrot reached codeforces
So I will admit that I thought of too many complicated ways on C1 and it consumes too much time. But then trying to simplify my observation to be just keep finding the minimum/maximum that I can take, the problem has a nice solution.
People might not like it, but I do like it as a problem, even if I struggled with it.
-DELETED-
Hi CF Community! I have a question about problem D in this contest.
assume that the first massive is a[0]
so let's count the number of appereances in final answer of each element in a[0]
a[0][0] => n * m
a[0][1] => n * m — 1 ....
and let's put two the second one a[1] and count the numner of appereances
a[1][0] => n * m — m a[1][1] => n * m — m — 1
.....
so shouldn't we sort by sum of a[i][j] * (n*m-j)
can someone tell me why that's wrong logic
Hello, could someone please tell me when Codeforces typically runs the plagiarism check? For example, how many days after a contest does it occur? Also, for round 1002 div 2 , have the plagiarism checks (and the process of skipping certain solutions) been completed, or are they still pending?
Would somebody be so kind and explain the formulars for 2065G - Skibidus and Capping
How the primes and primefactors have to be considered? I dont get it from the codes. Thanks!
A semi-prime number can be made in one of the following ways using $$$(p,q)$$$; wlog $$$p \gt = q$$$.
$$$lcm(p,q) = p*q$$$; where $$$p$$$ and $$$q$$$ are prime and $$$p\neq q$$$
$$$lcm(p,q) = p$$$; where $$$p$$$ is a semi-prime and $$$q|p$$$
Submission: 305353694
EDIT: Updated submission link with comments
Thanks!
brainrotforces
:o
GPT solved Round 1003 H (https://mirror.codeforces.com/contest/2065/problem/H).
I am sharing this code in the hope that it will help in detecting cheaters.
This is my ChatGPT log.
https://chatgpt.com/c/67a8d934-fa04-8005-bd69-36dd034fc7e1
My query was just only 2 steps.
1) copy & paste the whole context of the problem, and add one sentence.
I added by korean : 이거 조합론 문제같은데 어떤 아이디어가 좋을까?
In english it means : It looks like a combinations problems. Which Idea may be best?
2) GPT found all observations. (How to count the answer, How make the Solution efficiently from O(n^2) to O(nlogn) ) So I gave GPT my template code and just said, "Can you implement your code in this template?"
And GPT's Answer got AC. (AC code : https://mirror.codeforces.com/contest/2065/submission/305350099)
To avoid causing confusion on the scoreboard, I submitted the code after the competition ended. However, I was able to obtain this code before the competition ended and did not modify a single character.
Same, but I didn't need to give it the second query. I just copy-pasted the statement and it provided the AC solution.
Amazing Contest. Problems were fun to solve.
In problem E what is the point of writing max(x − y, y − x) instead of abs(x — y)?
to make it 300 words (teachers order)
c1==========>chutya
Just like you!
C1 and C2 ruined my contest.
Div 3.5
As a newbie, I want to say that for a test solving team consisting of only expert+, the problems came out pretty well. Really liked the round. Also, appreciate the design choice of making C2 such that C2 code works without change for C1 -- attempting C2 first made me completely bypass the C1 troubles people seemed to be having.
One of the best div-4 contest of Codeforces. Problem statements were easy, but the problems were nightmare. Pretty much unsolvable for AI. A complete brainstorming round indeed.
Good contest
For problem H, you should say you sum over
bwith multiplicity. E.g., despite0,1,00,01,001being the only subsequences of001, we sum over0twice and over01twice.Has the rating been updated? The competition is shown as unrated in the profile.
It seems that before the rating is updated, the competition is listed as unrated in the profile.
When will be the rating gets updated of this contest?
It is up now
cry Proof_by_QED chromate00 larush Edeeva I think you guys should add combinatorics tag for problem G. I just upsolved it and it used a lot of combinatorics ideas like double counting, number of ways to choose etc
from what I know it's any CM or higher ranked person that adds the tags, not necessarily the authors themselves
why mine code not working ->C2. Skibidus and Fanum Tax (hard version)