Шумбрат, Сәлам, Привет Codeforces!
Мы очень рады позвать вас принять участие в Codeforces Round 1103 (Div. 3) в 12.06.2026 17:35 (Московское время) — очередном Codeforces раунде для третьего дивизиона. В этом раунде будет 7-8 задач, которые подобраны по сложности так, чтобы составить интересное соревнование для участников с рейтингами до 1600. Однако все желающие, чей рейтинг 1600 и выше, могут зарегистрироваться на раунд вне конкурса.
Раунд пройдёт по правилам образовательных раундов. Таким образом, во время раунда задачи будут тестироваться на предварительных тестах, а после раунда будет 12-часовая фаза открытых взломов; после её завершения все успешные попытки будут перетестированы на успешных взломах. Мы постарались сделать приличные тесты — так же как и вы, мы будем расстроены, если у многих будут падать решения после окончания контеста.
Вам будет предложено 7-8 задач и 2 часа 30 минут на их решение.
Штраф в этом раунде будет равняться 10 минутам.
Напоминаем, что в таблицу официальных результатов попадут только достоверные участники третьего дивизиона. Как написано по ссылке — это вынужденная мера для борьбы с неспортивным поведением. Для квалификации в качестве достоверного участника третьего дивизиона надо:
принять участие не менее чем в пяти рейтинговых раундах (и решить в каждом из них хотя бы одну задачу);
не иметь в рейтинге точку 1900 или выше.
Независимо от того, являетесь ли вы достоверным участником третьего дивизиона или нет, если ваш рейтинг менее 1600, то раунд для вас будет рейтинговым.
Задачи были придуманы и подготовлены arsen1y, dvb1r и мной.
Мы хотим выразить специальную благодарность этим замечательным людям:
Vladosiya за крутую координацию раунда.
sqwiijqk, Arpa, Fakewave, sahasrad, yanb0, Egorsa и absolut3 за желтое тестирование.
SapeginIgor, ElyesChaabouni и D_ck за фиолетовое тестирование.
_bourrasque_, sh1n0a, OrleanMagic, string_eureka, stepan1111, BankaVarenya, Egorzykin, itz_pabloo, Timiguro, Datym, Ferume и ixeteny за синее тестирование.
opa, WiseKid, furt1ve и Gordey_Leushin за бирюзовое тестирование.
KruPavel, HelloFromMars, mrskzv, mhmusanna, Chaynikov, Gosha2403, hsiFomeN и Everes за зеленое тестирование.
ilyamn22 за серое тестирование.
MikeMirzayanov и KAN за замечательные платформы Codeforces и Polygon.
И, конечно, большое спасибо Вам за участие!
P.S. Попробуйте сопоставить каждого автора раунда на фотографии!
UPD. Разбор выложен!










finally a div3
As a glumbus, I was told to comment "meow >w<"
As a wacknana fornever, I hope sc3developer gets voting rights this round (we are definetly two different people)
As a friend of the authors, the contest is so legendary that I forgot to test it.
if you know anything about the history of this round, you know just how long it's been in the works and how legendary it's going to be
so true, my friend)
as a not tester, :(
From left to right: eyfxrby arsen1y dvb1r Am I right?
Yes, You are!
The best div3 i have ever tested :)
hoping for an interesting round :P
as a tester, i was a tester
as a tester, I was a tester too
as a tester hfeyl htfkmyj rhenjq gl to everyone also
As a tester, I think all kinds of participants will find this round interesting, so make sure to register!
Hope to become master
does he know
As a tester, I can confidently say that this is the best Tatar TV show I've participated in.
hey, can you please tell me why is the test n=4, k=4, s=1100 is YES? if n-k=0 then i can go from 1 to n-k, that is 1 to 0, which makes no sense. there is no number less than zero, and greater than 1. so basically, we do not have i, and thus no i+k. we cannot make any changes in the given string, so it is YES only if the string is all zeros, but it is not, so the answer should be NO. I'm getting WA in this test. this is a test in test case 2. This problem is Tatar Show, problem B.
output is "NO", try running the editorial code
edit: i am pretty sure you're failing the case n=3 k=1 s=101
edit2: the condition if(s[i]!=s[i+k]) should be removed. change to:
I'm ready to return to newbie this contest.
As a college student preparing for final exams, I'll sleep early this round.
Hoping for an interactive problem
Probably not this time. Usually, interactive problems are announced in advance. Sorry to disappoint!
I miss interactive problems ;((
cool profile picture :D
Cute dog
cooler profile picture :D
perm to use this ?
What does “7-8 tasks” mean? Is there any task which has easy and hard versions?
it is basically we have to solve 7-8 task that is -1.
I dont want to return to newbie this round
div 3 have to regain rating above 1000
Add some Interactive problem
So do we need to solve -1 problems in this contest?
We need to create one problem in this contest.
i thought this was 67 joke, i need help.
What did you mean?
I am waiting for the next contest with interactive problem
As a tester, I can say that the penalty in this round will be 10 minutes.
As a participant, I read the whole announcment.
div 3 farming :)
Опа, раунд от егора
finally, i div 3, better if there's also div 4 incoming
Сәлам!
As a dust on dvb1r's table, I can confirm the round will be great!
bruh
hello there
I have to write a Practical File and also have 2 External Exam Viva Tomorrow , I hope after that I will be Alive to give this contest. Very Excited for the contest.
Someone please buy Egor Nachkin a Coke Zero, because without it he starts doing weird things like creating Codeforces rounds.
As a liar, I tested the problems!
Are there any hard questions?
As a tester I am not a tester
My first rated Div3 after a long time xd. Here we go again...
According to my dream, problem A will be about cutting circles, and problems E1, E2, and F will be really hard, good luck guys (yes this is a real dream I had about this round, even though there's no subtasks)
good luck on reaching specialist today.
when will ratings update?
Thank you so much for Div 3. :p. First time I solved 5 problems! The codes are shorter than I thought it should be.
Can you explain how u solved d?
You can cheese it by only considering when the answer is "YES" and praying that all other cases give "NO". First, we observe that $$$x \leq y,$$$ so the numbers selected must be non-decreasing. This leads us to consider the cases near when $$$y$$$ is maximal (in other words, you can only choose $$$y$$$ and no other larger numbers due to $$$k$$$). Let $$$b_i$$$ be the largest such number, and let $$$b_{i - 1}$$$ be the closest number less than $$$b_i$$$. One observation is that if the number of values with value $$$b_i$$$ is even, then the answer is "YES". Another observation is that if you can go from $$$b_{i - 1}$$$ to $$$b_i$$$, then if the number of values with value $$$b_i$$$ is odd, then the answer is "YES".
We proof by AC that all other cases are "NO".
Normal type of coder, I guess.
Okk thank you
For a proof sketch, the only other case is where there is an odd quantity of each number in the array and the differences are all more than $$$k$$$. Then the entire game consists only of whatever number is chosen in the first move (since no transitions are possible). Now since the quantity of this number is odd, the first player wins.
This is some text.
The rest of the text.
include <bits/stdc++.h>
using namespace std;
define ll long long
define str string
define bl bool
define fi first
define se second
define pb push_back
define all(s) s.begin() , s.end()
void solve() { ll n, k; cin >> n >> k; vector a(n); for(auto &x : a) cin >> x;
ll cnt = 1; sort(a.rbegin() , a.rend()); for(ll i = 1; i < n; i++){ if(a[i - 1] == a[i]) cnt++; else if(a[i - 1] - a[i] <= k) { cout << "YES" << endl; return;} else{ if(cnt % 2 == 0) { cout << "YES" << endl; return;} else cnt = 1; } } if(cnt & 1) cout << "NO" << endl; else cout << "YES" << endl;}
int main() { ios_base::sync_with_stdio(false); cin.tie(NULL);
}
Loved it, really
I took too long to solve $$$D$$$ using DP, and due to that missed $$$F1$$$ by just a few seconds. Sadge :(
bruh!? you didn't even attend...!
its an alt most prolly
B > C
..
In C just in log_x(max(a, b)) you find ans for every pair. You over complicated it
..
guys is there any limit of how many questions we ask in a contest ??? just asking and def wont spam and idk but why is this round legendary ? i didnt read other questions except a b c d
i don't think so but coordinators can mute you if you're spamming (i think)
Any hints for F1?
lcm = product / gcd for two numbers, and then to expand that, just do nested lcms
Consider each prime individually
..
Hint 1 only applies when there are only two numbers. It does not hold in the general case.
oops, fixed
If any number x is one of the prime factor of product of all numbers in the a array, then think about how you can distribute that in p array.
Suppose some prime p is in the factorization of the ideal multiple, where can the prime come from? Can p have power? What is the number of possible ways to pick p? All primes are independent.
Divisors are pair wise co-prime, therefore any prime goes to at most one index. Simply count contribution from all.
First time solving 6 problems with a clutch E solve! Can believe I actually get to use what I just learned lol, sliding window is awesome.
..
I know right? Once I fix the window size the problem became possible. I am so lucky
For F, focus on a prime factor in the ideal p array. Where can be the prime factor be? How many possiblities are there? Then notice that we can treat each prime independently.
I failed F1 because I had the wrong mod and now I'm gonna end up with like 3 points below specialist
oh no
how do you calculate your rating beforehand ?
Several extensions give you a prediction of rating change, mine said +11 but usually it's a tiny bit higher
okay !
Problem G is too hard for me. I think this is the hardest Div.3 G problem I've ever seen.
I’ve been spending the whole contest on the last problem for the past div.2/3 rounds. I succeeded in the last Edu Round, but not this time.
Anyway, I really enjoyed the problem G in this contest.
I gave it a try, can you drop some hint, I think we have to use binary lifting and precalculate segments from lca to nodes, but i dont know what to do segments including lca.
Bad contest.
nhaa
The complexity in C is O(tlog(a)log(a)) and in E it's obvious that the limits don't permit an O(n^2logn) solution using a set, oset, or any heavy data structure like that.
The fact that you didn't implement it adequately doesn't mean it's a "bad contest" and you're probably just lying to yourself.
I'm not lying to myself. When I see things I don't like in a contest then it's bad at least for me. If everyone just doubted themselves and didn't give proper feedback, the quality would decline further.
n²log(n) passed for me with a set haha, the tl is tight enough to reject an additional find call on the set though. 378451679
hacked. n^2log(n) can't pass.
yeah i was thinking it'd get hacked but it hadn't by then
What was wrong with setting D huh?
I mean this is a personal banter but D took a huge chunk of time!
Any hints for C?
For C for a and b make paths for a and b . paths are made from a and b by dividing it by x until its zero then see if a and b meet at any other point not on both these paths you can say there is always a better solution than this! so.... from here you can do
Can someone hack my E? 378400145
hacked
did you use something like [3, 1, 1]? next_occ was flawed.
[1, 3, 3, 4, 5, 6]
E was a nice problem!
It was indeed incredible
TL for E seems too tight for me.
My solution(378403509) ran in O(N^2 log N) where as the correct solution seems to run in O(N^2). An equivalent solution(378441025) passed where the only difference was adjusting from using a
set<pair<int,int>>to avector<vector<bool>>andset<int>tovector<bool>. I got the idea and implemented a working solution which feels like the essence of the problem. In my opinion, small optimizations to remove a log factor, data oriented programming, or utilizing pragmas should not be part of the problem.I do not know how the problem was intended to be solved, but this was a very natural implementation given the problem. A sparse set certainly 'feels' faster when the number of valid subarrays is limited(e.g. random array) but should still be asymptotically fast enough for larger test cases. Granted, I was stupid by not trying to handle this in contest, but I normally find single
log Nfactors irrelevant to the problem.The reason for the set, handling duplicates, was also not covered in the test cases leading me to wonder if the problem designers had considered the potential extra
log N. I have made 2 successful hacks so far based on this flaw in testcases.Faced same issue
https://codeforces.me/contest/2236/submission/378437348 https://codeforces.me/contest/2236/submission/378437268
differnce between then is just one uses long long and one has int
Some hacks on E are getting unexpected verdict, can you look into it?
working on it
wheres the credit for pfp
The account AlgoQuasar123 was banned during the contest. Could you please review its submissions during the contest. I believe you’ll find that this was a false positive.
I request the authors to look into it as this is unfair.
The best contest ever!
GUYS can we use ai for hacking ???
Can anyone explain time limit of solutions for problem F2? isnt it n log^ 3(ai)? so i feel it shouldnt fit in 3 secs
If implemented well, it's more like $$$\mathcal{O}(P*\log(n))$$$, where the P is the total number of prime factors, and the $$$\log(n)$$$ comes from the maximum power of a prime. In the worst case, $$$P = n*\log(\log(n))$$$, where $$$\log(\log(n))$$$ is a rough estimate of the maximum number of prime factors, so in total its around $$$\mathcal{O}(n*\log(n)*\log(\log(n))$$$, which is around 1e6, so it should be fine.
The implementations which I've looked at seem to be log^3(ai) For eg if n = 1e5 and x = (1<<18) and all ai are also x wouldnt it suffer?
There is a 3d loop to calculate the dp which is why log^3
We can do DP in $$$O(\log^2 a_i)$$$ with some prefix sums. We must implement carefully to let a $$$O(\log^3 a_i)$$$ solution pass. A common approach is to avoid taking modulo on every addition.
It was a really nice and enjoyable contest. Maybe F2 and G were a bit too much and too difficult for Div. 3; for example, if G had involved a segment tree, the contest would have been even more awesome. But regardless, that doesn't take away from how cool the contest was. Thank you! fast tutorial please:)
bro how come you are un-rated if you could solve G ?!?!
Is this kind of braindead solution for problem E supposed to pass ? 378442486
why are you using solve function in a struct (crying emojis)
OOP brainrotting
VERY WEAK TESTCASE GOT DESTROYED IN E !!
Can some please explain problem D?
If Arseniy chooses x then the next set of values for Egor to chose are [x, x+k] then lets say Egor choses z then for Dabir its [z,z+k] ? or its [z,x+k]?
Or any explanations welcome.
Why is the time limit for E 3 seconds if O(n^2 logn) is not supposed to pass, I wasted most of my time optimizing the constant factor rather than trying a n^2 solution because 3000 (lengths to iterate) * 6000 (size of array) * log(6000) access in map is nearly 2.26 * 10^8
Map has a very big constant factor.
Changing webpage so fast to hack... that my account was flagged twice for crawling... ninni guys
My video and text editorial for all problems is available here https://codeforces.me/blog/entry/154479
Can anyone share and explain dp approach for problem D?
D was a good problem but i felt the framing of problem statement was bad initially due to which i was thinking choosing x was constant until i saw the changes made in problem statement and submitted just 1 s after the contest ended getting ac i wonder how people interpreted it correctly
editorial pleaseee
This is my 1st contest.......Can anyone tell me when does the rating changes
I am also unable to see my contest participation in my profile after selecting 'all'
Saketh_2007 govindkumarsingh140
since this contest has 12 hour open hacking phase, you must wait longer for rating changes :)
are they out yet??
no not yet, I think it'll be out in a few hours, as hacking and system has finished.
yep....Thanks.......I guess they are out now
d was a good problem but the language should have been clear instead of changing it mid contest in last 20 min i realized what the problem meant and solved it 1 min after the contest ended.I thought x was constant throughout the game then after correction i got it x getting changed every move. was it only me or anyone else faced the same problem?
great problemset,absolutely enjoyed the problems . i just felt that E's statements and sample could have been better .
solving D using sparse table. hehehe
So how long will my crawl flag stay?
why does my code works for the problem D?378488814
where is edutorial? where i can the tutorial the solutions?
working on it
where is editorial?
working on it
when’s editorial going to be published??
please wait a moment, there was a problem with polygon
uploaded
Please upload the editorial for Codeforces Round 1103 (Div. 3), its been 24 hrs. I'm waiting, thanks.
uploaded
The difficulty was div2
Please can anyone tell me what is wrong in this code? It is working fine on test case 1, but not on test case 2. IDK what is the problem.
I am writing regarding the recent similarity report for my submission to problem 2236D. I solved this problem on my own during the contest. In fact, I spent a significant amount of time thinking about the problem before arriving at my solution. I did not copy code from another participant, nor did I intentionally collaborate with anyone during the contest. After seeing the comparison, I was surprised to find that the solutions are extremely similar. I understand why this raises concerns, but I genuinely do not know how such a similarity occurred. The code I submitted was written by me while solving the problem independently. I don't even know the guy who has the similar code. I request you to please look inyo this
I just recieved this message:
Your submissions in contest 2236 — Codeforces Round 1103 (Div. 3) were skipped because of a rules violation in one or more submissions for problem 2236F1 — Elections in Saransk (easy version).
I really don't understand what is the problem with my codes, or maybe my submissions, but I am continously getting this. My previous ID was banned with this message and now I am getting this here, please check and tell me what is wrong.
MikeMirzayanov Vladosiya arsen1y dvb1r eyfxrby
Just got a message stating —
Attention! Your solution 378429080 for the problem 2236E significantly coincides with solutions killuaxd/378403042, khanayaan7/378429080. 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://codeforces.me/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.
I want to clarify that killuaxd is my alternate account,which I use to attempt contests whenever I have less time to take part in contest and I used this to participate in the contest Codeforces Round 1103 (Div. 3).Since I didn't have time to attempt another problem, I submitted the same solution on my main account khanayaan7 to maintain my streak. I didn't realize the contest was still ongoing (with 15 minutes remaining), and even if it had not ended, it wouldn't have affected my rating since it was a Div. 3 contest and my main account is rated above 1600. I did not engage in any form of cheating. Going forward, I will participate in contests using my main account only. I sincerely apologize for this ,genuinely didn't realize this was against the rules, but I now understand and will ensure it doesn't happen again. In light of this, I kindly request that the skipped flag be removed from my main account.
MikeMirzayanov Vladosiya arsen1y dvb1r eyfxrby
I would like to clarify that my solution was written independently.
My submission was submitted before the other participant's submission. I did not have access to the other participant's source code during the contest, nor did I exchange source code with anyone.
I understand that the solutions appear highly similar. However, I solved the problem on my own and implemented the solution independently. I am able to explain the algorithm, the reasoning behind it, and the implementation details if required.
The other participant and I study at the same college and have learned similar algorithms and problem-solving techniques, which may have contributed to similarities in approach. However, I did not collaborate with them during the contest and did not share or receive code.
I performed well in the contest overall (rank 59), and I respectfully request that my case be reviewed individually. I am willing to provide any additional clarification if needed.
Thank you. Codeforces Round 1103 (Div. 3)
hi
Subject: False Positive Plagiarism Flag on Problem 2236D (Brand New Tatar TV Show) Hello Codeforces Team / Contest Coordinators, I received a plagiarism warning stating that my solution for problem 2236D (Brand New Tatar TV Show) matches another user's code. I want to state clearly that I wrote my solution completely independently and did not engage in any cheating. My Submission Link: https://codeforces.me/contest/2236/submission/378398552 Flagged Match Submission Link: https://codeforces.me/contest/2236/submission/378370861 Problem 2236D relies heavily on an exact, step-by-step game state reduction. The core logic dictates a highly specific optimal strategy:Sorting the values or processing frequency from the maximum element downwards.Checking the odd/even frequency of the absolute maximum element to determine the winning strategy rules.Because the problem is deterministic with limited optimal pathways, any standard solution requires an identical sequence: standard array sorting, frequency mapping, and a direct conditional loop. The similarity in code is a pure coincidence driven by the natural, intended mathematical logic of the problem. Also if I have done copying then why I have one wrong submission and also I would have done copying all the question from him and also the nationality of other user is might be different from mine. So consider all this reasons for not doing the Plagiarism.
Please review my case and restore my submission status. Thank you for your time and hard work! Best regards, Darshil_Marvaniya
Hi everyone, my submission, 378407286, has been skipped for violating some rules, even though I didn't use AI or any cheating methods. Does anyone know why or how I can fix this?
nice contest
Dear Codeforces Team,
I have also received a warning for submitting similar code. I would like to explain that this solution method was genuinely conceived by myself. Many other participants also submitted answers adopting the same idea for this problem. I truly respect Codeforces rules and have no intention of violating them deliberately.
I sincerely ask you to lift this warning, as it has affected my mindset. I still hold a strong passion for programming, fully abide by your platform rules, and I understand the potential issues behind this incident. Thank you very much for your consideration.
Dear Codeforces staff, I receive a notice saying my solution for problem 2236C has high similarity with another user’s code, which leads to a rule‑violation warning. I swear that I finished the whole code entirely on my own without copying, sharing code or cooperating with other contestants. The identical parts are standard public algorithm templates widely available online before this round, not exchanged during the contest. Here are the links to these publicly‑available templates for verification. Please check my submission and remove this violation mark. CF1485A entry: https://www.luogu.com.cn/problem/CF1485A Open the "Editorials" section, and you will find codes that share the exact same core logic: enumerate the number of division operations, add values to reach a multiple of the divisor first, then perform division.