Добрый день!
В 12.12.2021 18:15 (Московское время) состоится Технокубок 2022 - Отборочный Раунд 3 олимпиады для школьников Технокубок 2022. Раунд будет длиться два часа, участникам будут предложены 7 задач. По его результатам лучшие участники (но не более 45% от общего числа участников раунда) будут приглашены на финальный этап. Для регистрации на раунд и участия перейдите по ссылке. Не забудьте заранее зарегистрироваться на раунд! Для опоздавших будет открыта дополнительная регистрация.
Зарегистрироваться на Отборочный Раунд 3 →
Соревнование открыто для всех в виде отдельного раунда.
Раунд Технокубка является рейтинговым для всех участников, Параллельный раунд рейтинговый для участников из второго дивизиона.
Параллельно с Отборочным Раундом будет проведен открытый рейтинговый раунд для второго дивизиона, в нем могут принять участие все желающие.
Напомним, что согласно правилам раундов Codeforces во время соревнования ваши решения будут тестироваться только на претестах (предварительном и неполном наборе тестов), а системное тестирование состоится после окончания раунда. Обратите внимание, что претесты не покрывают все возможные случаи входных данных, поэтому тщательно тестируйте свои программы! После прохождения претестов у вас будет возможность заблокировать решение, тем самым получив привилегию искать ошибки и взламывать чужие решения, но отказавшись от возможности перепослать ваше решение при каких-либо обстоятельствах (например, даже если вы найдете ошибку или вас взломают). Со временем задачи падают в стоимости. После системного тестирования учитываются только полные решения. Подробнее про правила соревнований можно прочитать по ссылкам:
Регистрация на олимпиаду Технокубок еще открыта. Победителей и призеров олимпиады ждут значительные квоты при поступлении в престижные технические вузы России и ценные призы! Если вы — школьник 8-11 классов и пока не зарегистрировались на Технокубок, то самое время сделать это:
Зарегистрироваться на олимпиаду →
После регистрации на олимпиаду не забудьте зарегистрироваться на Отборочный Раунд!
В финал соревнования будут приглашены лучшие участники каждого из отборочных раундов (но не более 45% от общего числа участников раунда).
- Авторы отборочного раунда: Denisson, antonis.white, dimatimoshin23, napstablook, kirill.grachoff
- Спасибо Makcum888, snowysecret, stevancv, wxhtzdy и ijxjdjd за тестирование.
Удачи!
UPD: поздравляем победителей!
Технокубок 2022 - Отборочный Раунд 3
Codeforces Round 759 (Div. 2, основан на Отборочном раунде 3 Технокубка 2022)
Опубликован разбор задач.
Для тех, кто впервые на Codeforces: в таблице ниже вы можете найти примеры решений на всех поддерживаемых языках:
Группа языков | Языки программирования / компиляторы | Примеры |
---|---|---|
C | GNU C11 | 10903473, 17029870 |
C++ | GNU C++14, GNU C++17, GNU C++20, MS VC++, etc. | 23794425, 5456501 |
C# | Mono C#, MS C# | 3195513, 3794163 |
D | D | 5482410, 2060057 |
Go | Go | 7114082, 21366098 |
Haskell | Haskell | 455333, 1668418 |
Java | Java 8, Java 11 | 25491359, 23678167 |
JavaScript | V8 | 35963909, 35681818 |
Kotlin | Kotlin 1.4, Kotlin 1.5 | 25779271, 25204556 |
OCaml | OCaml | 6157159, 1281252 |
Pascal | Delphi, FPC, PascalABC.NET | 1275798, 1259434 |
Perl | Perl | 2519448, 1277556 |
PHP | PHP | 413942, 35875300 |
Python | Python 2, Python 3, PyPy2, PyPy3 | 35883730 (Py2), 36179112 (Py3) |
Ruby | Ruby | 1837970, 1289551 |
Rust | Rust | 25180002, 35652442 |
Scala | Scala | 35847980, 2456025 |
was waiting for this since long :)
still waiting
Yes 18:15
will this be this final 5 mins or there's more to come. lol
I am getting owned, woke up at the asscrack of dawn to participate in this contest in my timezone and it's delayed.
Must be for good reason though.
can't wait :)
Note the almost unusual timing.
An usually unusual timing lol :x... nx5mins too
if any of you are interested in cheating, send a message to nitin_05 or ashokesen02. they both became experts in codeforces by buying solutions and adding many comments in the codes.
Okay ,but what's the point?
Wait, why is elim round 2 rated for div1+div2 but elim round 3 only rated for div2 and those div1 contestants that are Russian-speaking students?
Because we don't have a good set of problems for div. 1 round this time.
Then the official round is unrated for those few 2100+ registrants, right?
The Technocup round is rated for all participants.
But you don't have a good set of problems for div1 participants. The official round has div1 participants.
Maybe it's just unbalanced for Div. 1 participants, but balanced for an elimination round rated for all Russian schoolers.
Just me trying to justify this move. I was also disappointed with the absence of a Div. 1 version.
What makes those Russian students so special? It's easy to find an explanation but not so easy to find one that actually makes sense when you think about it and doesn't become a completely "ICPC Asia"-like arbitrary cutoff.
Maybe they don't have hard enough problems to serve all Div 1 contestants (like IGMs and LGMs) but good enough for lower rated Div 1 contestants, which they expect in the official round.
Then the unofficial round should be rated for those lower-rated div1 contestants.
In general, why doesn't Codeforces make Div. 1.5 rated for $$$< 2800$$$ (like ARC)?
title only in russian
Thanks, fixed.
if problem statements were this short like this blog!
Sad for div1. But I think that there WAS a div1 in the list.
It is indeed sad, but I prefer having no Div. 1 rather than shitty Div. 1 where you only find out it's shitty after you've started participating.
When I see a Technocup will be hold, there will be a high-quailty contest.
Last time, there was a weak pretest. And this time, there's even not a div. 1.
Hope I can become Candidate Master in after this round
so nitin_05 and ashokesen02 both registered in this round.
This is competitive cheating
Codeforces round based on Technocup is rated or not?
Whenever you see the words Codeforces Round #... it just means it is rated.
Ok thankss___
What about the scoring distribution?
Yeah I thought they'll publish it at least 30 min before the round, but still nothing.
As a tester, I heard that problems are beautiful!
You heard? Don't the testers see the questions beforehand as they give a VC of the same contest? Just want to know.
That’s joke. All in all, problems are beautiful!
It's about 10 minutes to start, What about score distribution?
It's about 10 minutes to start, What about score distribution?
hope i am able to solve 3 question
You will do it.
note 5 minutes delay
Looks like they don't want to reveal the score distribution for the technocup participants
i could finished my dinner
Is that another Codeforces problem?
I think the additional 5 min delay is to apply and fix the last round rating changes.
Contest extended by 5 minutes. Is everything ok?
hope I do better....
+5 minutes. Might be a signal that I should not attempt this round if I don't want to drop down to Expert!!!
Don't worry so much about rating. Focus on learning
I got -160 in the last 2 contests combined. I only want my lost rating back xD
I got -130 in the last one. Glhf for us I think xD
look at my last 5 deltas then !
Still love the screencasts so do give the contest :P
No, I Hope you will do good. Good luck.
oh no, I was waiting for youtube video from u)
maybe I am gonna drop down to specialist too
It is a sign to not attempt this contest for sure now.
We want screencast
another delay of 5 mins. maybe two negatives make a positive [ delta :) ]
This is my only hope now. Finally deciding to attempt it then.
I hope u reach Master in this one
Update: A huge negative delta is on the way. It was a sign xD.
You got god-level instinct
mistakes were made(you didn't heed the signal, neither did I)
delay?
I think the additional 5 min delay is to apply/fix the rating changes of the last round.
Yo bois Have fun solving.. :)
Okay this is not fun waiting (:
Why delayed by 5 mins!
Will this be the first contest without the score distribution known in advance? :O
ok, again 5 more minutes to fix this I hope
Will this contest even start?
Hope to increase my rating by 50 pts
Using Inspect in you browser!!!
By that I can virtually become grandmaster in just 5min!!
Well you want exact 50 else you can get +50 easily by solving 2 problems very fast IMO.
I did 2 problems but predictor is showing -26 :(
well i said if you solve two problems very fact like in 20 minutes or something you can get a +ve delta of 50. But it was a bad round for me as well.
Hope is a good thing..
but may be you can give contest without thinking much about rating and surprise yourself..
Another 5 minutes delay!
"Ah shit, here we go again" (c)
why?
Low register people i guss, due to last round (13152)
Are there queue issues?
another 5 minutes...
Oooh ! Another 5 minutes delay !
heab
Not A good sign of a Good Contest !!!
Ya!
delayforces
What's going on ?? delayed by 5 mins again.
Double delayed!
Late OP >_<
why is it constantly delaying?
Am i really on codeforces or i am on codechef!!!
The problems aren't accidentally visible during these delays so probably not Codechef :P
I can't see the round in contest list ... what happened ?
+5 again, hope this round will be smooth.
Delayforces!
Upvote if you think there will be another 5 mins delay?
else downvote?? :)
delayed ;_;
another 5 min delay , it's irritating!
:(
how many selection rounds for techocup gonna be?
CF Be like
5 More mins
5 more mins
Another One DJ Khalid
Bye I am going to take my dinner.
Ok Sir
Waiting for another 5 min delay
I have a joke on codeforces but I'll say it after 5 mins.
will codeforces catch them as cheaters or not ? I think the answer is NO.
I also want to report this. Is there a person manipulating different accounts in the contest? This should also be considered cheating. And since these accounts are newbies, it will make others rating drops much since you will be considered "defeated" by a bunch of newbies if these cheaters are not removed.
UPD: They finally appear on official ranking 22-26, 28-39 (except two CM and one expert)
WTF???
Actually, they were also cheated in Educational Codeforces Round #118, ranking 20~24. I expected them being caught cheating and became skipped then. Seems like they were not caught by Codeforces by using random space or different name of variables.
speedforces again...
Arrayforces.
Solution of F : ARC 115 E
Oh my god !
Yeah, got first solve on F because of this. lol
Is the round going to be canceled?
There are several duplicated problems in the past, but they never made a round unrated because of duplication. So I think it's still rated. (Though, I think it should be unrated in my opinion. I didn't like free rating like this very much.)
As this is the last problem of the contest. Can they just delete the problem from the problemset and recalculate the scores?
Solution of D (90%): TRPLSRT
what do you think of problem F?
Ctrl + C
Ctrl + V
F = https://atcoder.jp/contests/arc115/tasks/arc115_e
My E has encountered memory problems when in my opinion there is no real improvement to do. Are others in this case?
How to solve C?
A strange thing happened to me, this solution to problem C gave RunTime Error on Pretest 1 but, on local ide it gave correct output and when I submitted it to C++ version 14 instead of 17, pretests passed!
somebody please help. why this is giving RTE?.link
A bit wierd. Now technically integer overflow is undefined behavious as it happens in line "for (int i = sz(pos) — 1; i >= 0; i -= k)" when size of pos is zero (size is a unsigned int), however most of the time it works fine.
Anycase it is a bad idea to rely on undefined behavious. I just typecasted it to signed and it worked fine. https://codeforces.me/contest/1591/submission/139012140
it also worked when i shifted from GNU C++17 to GNU C++20. and thank u very much for taking the time to analyze my code.
It has undefined behaviour in line "ll x=a.size()-1, y=b.size()-1;". When a.size()=0 or b.size()=0.
Shouldn't x or y be simply -1 in that case and the control shifts to the next line? Or, am I missing something?
Well a.size() returns unsigned int 0. When you subtract 1 from it, it overflows which then is assigned to x. Hence a undefined behaviour (overflow). Most of times it evaluates to -1 but i guess undefined behaviour is called undefined for a reason.
What is the approach to solve problem C??
For me C was horrible implementation problem, I fiddled like an hour on it.
Actually it is not so complecated. First observe that left and right side are independent of each other, each can be solved separate.
Then consider blocks of k elements, starting with the outermost (the longest distance) elements. For each block we need to walk the distance to the max one, and most likely back.
Do this for both sides. Then, after end, we can remove the one distance we not need to go back, that is max(abs(a[min]),a[max]). i.e. we go to the farthest element last, so can subtract that distance in the end.
Solutions for problem F : https://atcoder.jp/contests/arc115/submissions?f.Task=arc115_e&f.LanguageName=C%2B%2B&f.Status=AC&f.User=
meh arc115_e
Too little time limit in task E. Please raise the time limit in task E up to 8-10 seconds.
please don't.
This F question is as like as two peas ARC115E. It's really speechless!!!
https://atcoder.jp/contests/arc115/tasks/arc115_e
How to solve D ?
I don't know how to prove it, but the ideia is that if inversions%2 = 0 or any number appears twice the answer is YES, otherwise is NO.
The cases where
n = 1
andn = 2
are trivial.Let's suppose
n >= 3
and all elements are distinct. We can notice that by using a 3-cycle, the parity of the number of inversions in our vector remains the same. So, if all the elements are distinct, then we only have to check whether we have an even or odd number of inversions in our array.If there are at least 2 equal elements, then we can use them to put all other elements in their place, so the answer is YES everytime in this case.
How do you define "inversion"?
An inversion is a pair of indices
(i, j)
such thati < j
anda[i] > a[j]
Maybe apply coordinate compression and use fenwick tree or segment tree to count number of inversions?
Ordered set
There's no need for coordinate compression since all values are <= 10^5. But yes, Fenwick Tree is one of the ways
I did with counting inversion, such a triple swap of three distinct elements changes the inversion count by 0 or 2.
Also the array can be pre sorted. And if the array includes any element twice, then it is allways sortable because we can use the double element to simply swap elements.
Case 1: There are no duplicate values. In that case, we can decompose the permutation into cycles where $$$i \to a[i]$$$. After playing around with some cases on paper, you'll find that we can perform the following operations:
An array can be sorted if it can be split into cycles of size $$$1$$$.
So now we decompose the array into cycles, merge the cycles, and the answer is YES if the size of the resulting cycle is odd.
Case 2: There is a duplicate value. In that case, it's always possible. Say the value $$$x$$$ appears twice in the array. For the case where all our cycles merge into a cycle of even size, we can reduce the cycle to size $$$2$$$, then shift the cycle to one between two values $$$(x, y)$$$, then fix that swap with the help of the second $$$x$$$.
The implementation can be even simpler. In Case 1 we can show that the permutation can be sorted if and only if the number of even cycles is even. We just run dfs and find the number of even cycles.
I think that's around the same implementation difficulty as mine, because when I say "merge cycles," I just mean "add up their sizes."
Submission for Reference
I'm having a little problem in wrapping the idea. It would be great if you can answer the following questions:
Why is
sum
initialized with1
in your submission and what does it denote?Why are you adding
cycle - 1
in sum and what does it finally result in?Why I add
cycle - 1
: I'm merging all of the cycles by incrementally adding cycles and using the rule for merging two cycles stated above. So the total size becomes $$$A$$$, then $$$A + B - 1$$$, then $$$A + B + C - 2$$$, then $$$A + B + C + D - 3$$$ and so on.Why I initialize
sum = 1
: Adding the first cycle is an edge case because I have to addcycle
instead ofcycle - 1
, so to account for this I initialize to 1 instead of 0. This will also work if I detect no cycles since that would mean the array is already sorted, sosum % 2 == 1
and I print "YES".Okay, I understand now. Thanks!!
What a nice explanation guys! Thanks to both of you.
man what a solution :D
In other words, the given operation is performed using 2 swaps, a swap merges two cycles or splits a cycle.
I solved D without using the ideas of inversions. First, for the case with duplicates, we can see that we can use any two of the same number and "move" a third number into sorted order.
So, for the case without duplicates, the array will be a permutation. The sorted array will have $$$a[i] = i$$$ for all $$$i$$$. Instead of using inversions, I tried, for every $$$i$$$, to swap $$$i$$$ into position $$$i$$$. If after all swaps the array is sorted, the answer is YES and otherwise NO.
To swap $$$i$$$ into position $$$i$$$, assume number $$$i$$$ is at position $$$x$$$ ($$$x \neq i$$$). Then, if $$$x \neq n$$$ we can select the positions $$$i$$$, $$$x$$$, and $$$n$$$ to move $$$i$$$ to position $$$i$$$. If $$$x = n$$$, we can use position $$$n - 1$$$ instead. This works because we only care if number $$$i$$$ is at position $$$i$$$, so we can arbitrarily use the last position to be our third number. All we have to do is keep track of the positions of each number when performing our operations and lastly check if the $$$a[i] = i$$$ for all $$$1 \leq i \leq n$$$.
Finally managed to solve two questions for the first time.
Edit: FST :( on B
I stupidly printed 1 instead of 0 if the last element was max (when not sorted), surprised the pretest didn't cover it, oh well, I will try to solve 2 or more next time :).
The more famous Codeforces will be, the more cheaters will be there.
Can we solve F using a lazy seg tree? I got a solution if $$$a_{i} \le 10^{5}$$$.
Tried this during contest, but got ML. Not sure if there's a way to optimize.
Just use implicit segment tree and it works for ai <= 1e9
Yeah you can use a sparse segment tree.
You can use coordinate compression to build seg tree my submission
Are you sure that it's a normal lazy segment tree?
Yes, it's a normal lazy segtree written pretty badly. Just the nodes are different.
B from https://codeforces.me/gym/100112/attachments/download/1290/2012-nordic-collegiate-programming-contest-ncpc-en.pdf is almost the same problem with D
Also it is very similar to this problem: Click.
but this problem is more complex than the one in codeforces
How did you guys solve problem B?
I figured out that the array stops changing when we have a[n] = max(a1, ..., an), but could not continue from there.
If a[n] is not the biggest element, then it is changed to the next one left of a[n] with a[k]>a[n] And so on. Just count them until you found the max element.
Can someone who found the similar problem to F during the contest please tell how did they go about searching it?
That's a well known problem, and I had solved it before. Any questions?
By seeing the number of solves, some very fast solves and the simplicity of the statement I also figured that there's a very good chance that a similar problem may have existed. I was just curious if someone who hadn't solved that atcoder problem was able to find it and if yes how?
Today was all about competitive searching then, ig.
SearchForces
I doubt it's searchable tbh. Probably just solved it there and can remember it.
I thought I remembered it from an Atcoder contest so I searched the 50 most recent ABC's and then went through ARC's until I found it.
Wow, I think this is the only reasonable way unless someone was able to find it through google search. I guess you deserved the solve after that much effort xd
I "solved" B by going over the problems but it was too slow on pretest 5. Was there any way to make it faster? Was it just a "recursive" problem until the biggerThanX arrays length is 0?
https://codeforces.me/contest/1591/problem/B
The expected solution has a complexity of O(N).
Just iterate over the array from the last position, and whenever you encounter an element greater than the current max, increment a counter and update the current max.
If the array is already sorted in asc. order, the counter's final value will be 0.
Your code's complexity is $$$\mathcal{O}(n \cdot ans)$$$. Expected complexity is $$$\mathcal{O}(n)$$$.
Thanks Kirill,
How do I know what is the expected time/memory complexity of the task? I didnt see anythig in the description that would indicate this requirement.
Andras
Complexity requirement is based on time limit and modern processors' speed. You can follow the rule: $$$C\cdot10^6$$$ op/s.
Problem E is really good, it can be solve in O(n log n).
The ideia is really similar to this old one from Codeforces, besides the MO and stuff:
https://codeforces.me/contest/375/problem/D
PS: finally coded it right, here it is: https://codeforces.me/contest/1591/submission/139023972
Problem B : In the 2nd test Case [1,3,2,4,5], why not we pick "2" and then [1, 2, 3, 4, 5] ?
Read the statement. You always pick the last element. You pick 5 here and the array doesn't change at all and the answer is 0
Read the problem more carefully. We always pick the last element (a[n]) in every operation.
I can't believe that none of the testers has solved ARC 115E
Why do you set problemF without changing any words? Maybe your purpose is to find the participants who have solved thisARC115E-LEQ and NEQ?
I mean this round should be unrated. It's a big mistake.
Whenever you see short statements on codeforces, head over to atcoder....
I'm confused about the decision to make $$$n \leq 10^6$$$ in problem E. DFS with recursion depth $$$10^6$$$ is quite dicey, and if you look in the accepted submissions list almost every submission runs in at least half, if not almost all of the time limit.
Ah yes, and now there are FSTs coming in on the leaderboard. What a surprise!
The intended complexity of solution is $$$\mathcal{O}(n + q)$$$. This was an attempt to cut off $$$\mathcal{O}((n + q) \cdot \log(n))$$$ solutions with big constant.
Unfortunately, I wasn't allowed to decreases TL any further. As I see it, recursion and input takes most of the time in linear solution, so decreasing TL to 3s wouldn't change anything for them independently from implementation. But it could have cut off some solutions with __gnu_pbds::tree or segment tree.
Yeah, unfortunately it's practically impossible to distinguish $$$\mathcal O(n)$$$ from $$$\mathcal O(n \log n)$$$ in the world of CP. I think the best course of action in this case would be to either give up and let $$$\mathcal O(n \log n)$$$ pass, or try to modify the problem in some way such that the $$$\mathcal O(n \log n)$$$ solution doesn't work. Trying to force $$$\mathcal O(n)$$$ with a strict time limit is almost guaranteed to cause negative feedback.
My $$$O(n+q)*sqrt(n)$$$ solution passed under 3s
You should really read this prerequisite for being a problem setters by Um_nik
Why is the time limit for problem E so tight? What solution are you trying to kill?
That was an unsuccessful attempt to kill nolinear solutions with bad constant.
I think trying to distinguish $$$O(n)$$$ vs. $$$O(n \log n)$$$ is a terrible idea here (and usually is in general). Both I/O and DFS have a comparable runtime to $$$n \log n$$$ algorithms in practice.
Of course, it's impossible to cut off all nonlinear solutions. It was meant to kill only heavy ones. IMHO, here they were actually distinguishable with TL=3s. As DFS and I/O takes about the same time independently from implementation, and solutions with SegTree or std::set are using statistically more time.
Anyway linear solutions were't harmed by tight limits, but maybe it was actually dumb to try to kill heavy nonlinear ones.
The desire to prioritize linear solutions makes sense to me, but in practice it's a horrible competitor experience when virtually everyone who passes has an $$$n \log n$$$ solution and it ultimately just comes down to constant factor.
can someone explain solution of problem c?
Lets solve the problem separately for elements with xi < 0 and elements with xi > 0.
Notice that if number of elements, that are for example more than zero(lets denote them as R), is divisible by k, we can get optimal answer by going firstly to closest 1...k elements, than to k+1...2k, and so on.
So, we can firstly take R%k elements, return back, and R-R%k elements that will left can be taken using greedy approach that I have described. Solve it independently for two types of elements(smaller and greater than zero) and subtract maximal abs(xi). I hope i have explained clear enough, sorry for my english :). If you have any questions I can send my code.
I understood the coding part 138928969 , but still lack clarity in the whole idea.
I want to make sure that some idea from this problem sticks to my knowledge tree, so that it becomes transferrable to other problems. I want it to have an impact on how I will think of other problems in the future, but so far I didn't manage to extract anything generalizable.
My best attemt is a two-part summary:
1. Try to ignore one part of the solution (probably they are symmetric).
2. Try to split the space into $$$k$$$ parts.
But I doubt that this summary is a useful insight that will stick with me and will help me solve other problems. There has to be a clearer picture or some other useful abstraction :)
D is a repeat of https://open.kattis.com/problems/bread
and C is a repeat of https://po.kattis.com/problems/biblioteket
Try finding A,B, and E, I am sure even those will also be copied from somewhere:XD
problem D- https://www.codechef.com/problems/TRPLSRT
When you choose few testers to test the contest : problem D : https://open.kattis.com/problems/bread problem F : https://atcoder.jp/contests/arc115/tasks/arc115_e
This contest was even worse than the previous contest. If the solutions to problem D and problem F are already out then it's just the sport of Googling, not a mind sport. Why do problem setters even try to copy the same problem? It's not just a coincidence that the problem setter in atcoder (problem F) and in Kattis will form exactly the same question.
In the problem E, setters want to kill set's $$$\log$$$ isn't it?
My solution without set passed in 1871ms
I tried to kill nonlinear solutions with bad constant. I personally would have decreased TL even to 3s.
Well that was idiotic my set solution 138883336, also my non-set (NOT SO DIFFERENT) Solution 138939436
Number of successful submissions in F are far more larger than those in E.
Is this contest rated??
What's the solution for F?
Editorial is already out. Read editorial : https://atcoder.jp/contests/arc115/editorial/975
You've just made my day.
Did expected solution for F require inclusion exclusion?
The explanation of example test case 1 in Problem B has something wrong. In the explanation, it's said: The first eversion: a = [1, 4, 2, 5, 3]. But in fact, a = [2, 4, 1, 5, 3]. The explanation troubled me a lot and made great influence.
The explanation of example test case 1 in Problem B has something wrong. In the explanation, it's said: The first eversion: a = [1, 4, 2, 5, 3]. But in fact, a = [2, 4, 1, 5, 3]. The explanation troubled me a lot and made great influence.
+1
138924326 138922538 why does this always happen to me. I lieterally only needed 10 extra seconds to submit.
People who saw problem F before on AtCoder, Problem
At least three (F,D,C) out of six problems are literally stolen from older contests lmao
Yeah C was also like I have seen it somewhere. But coded once again on my own instead of finding. Can you please post the link from where problem C was copied?
https://po.kattis.com/problems/biblioteket I had solved from here before, but this site is for old Swedish olympiads so you probably solved somewhere else if you're not swedish.
I don't understand what's wrong with my solution for D using segment tree.
https://codeforces.me/contest/1591/submission/138912355
Can someone point out mistake.
Looks like problem was integer overflow somewhere. Submitting same code by replacing int with long long int everywhere passed.
https://codeforces.me/contest/1591/submission/138948492
I didn't like the round. Coding segment tree for D, coding treap for E, coding compressed segment tree for F... It was too much of binary balanced trees. However, one friend of mine told me that I could have used __gnu_pbds::ordered_set for D and E. Also, I am glad to hear that the intended solution for E is linear.
UPD: Well, it seems that F also have linear solution. Then... OK, I just have chosen bad ways to solve the problems.
You can also solve F in O(n) with a stack instead of segtree (the dp value doesn't change much at each prefix).
D, E also have linear solutions without any binary trees too)
Really, you can count inversions in O(n)? I have believed that the two ways for it are merge sort and segment tree, both are O(nlogn)
There's a way to solve D without using inversions, which I did in contest.
Explanation here.
Cool!
I can count parity of number of inversions in permutation in O(n).
Iterate through permutation from right to left. Maintain inverse permuation along the way. Each time you look at $$$a_i \neq i$$$ you swap $$$a_i$$$ and $$$a_{a^{-1}_i}$$$ and change the parity.
Could you explain more specifically, please? Is there any code/submission I can take a look at? thx.
The high constraints should hint that treap will probably TLE but if you really want to use treap, there are ready implementations like mine.
F is literally copy paste from this https://atcoder.jp/contests/arc115/tasks/arc115_e
Bro it's F on codeforces
Cheating reported. Official ranking of 28-39 (expect two purple users) are all have same code.
UPD: So as 22-26 (except 24)
Because many people solved the last problem, I was convinced that it's easy and I spent all the time working on it, Didn't even think about doing D lol. All this because people just copied solution from some Atcoder submisson. It happens, whatever.
Probelm F. Non-equal Neighbours is repeated from past at coder:(
https://atcoder.jp/contests/arc115/tasks/arc115_e?fbclid=IwAR38FJkW4QQHqvhn_kPrrcK3p0QuYFtJLBmumQjyTmUHUitfz3Qtk0tbb8w
Why so many downvotes for this post?
Problem F is just an Atcoder problem (exactly the same, not a word changed) It is unfair for others who haven't seen it before.
Thanks for feedback.
another <0 rated blog lol
Am I the only one who got D correct but missed the fact that there could be repeated numbers ? :'(
Spent entire contest trying to figure what's wrong.
Problem F : Non-equal Neighbours is repeated from past atcoder contest:(
the source :
Next time give links to the sources where you have copied the problems from, why put in so much work? At least it won’t be unfair for those who don’t use google during contests.
Here are the copied problem's link found till now :
Problem C : https://po.kattis.com/problems/biblioteket
Problem D : https://open.kattis.com/problems/bread
Problem F : https://atcoder.jp/contests/arc115/tasks/arc115_e
1- Copy the statement
2- Search on google
3- Ctrl + C
4- Ctrl + V
searchforces!!!!
A great contest with completely original problems and reasonable time limits.
It provides great experience and shows how dumb I am.
12 out of 10, would absolutely lose my ratings again.
Sorry for the italics, but this is not the best contest I've ever had :(
I thought F was easy when I saw a lot of people solved F and wasted some time on it.
Plz check again with your tasks to see if there's any existing problem that has a similar solution.
At least change the statements a bit more if you intended to add these problems...
I mean I solved F without knowing it appeared before, but couldn't solve D so I think it was also easier + appeared before => many solves
One more contest being downvoted a lot.
Have fun!
Almost everybody: It's not funny
F
This contest deserved downvotes. Last one didn't.
Seeing 8 people from Japan in the top 10, I should have known to look for F on AtCoder...
if this is rated it'll be my last contest on CF, bye bye!
says an unrated guy!
Since this will be your last rated contest, then comment with your original id. What will you do with your contribution? It will become 0 someday since you had quit.
Make it unrated, it’s unfair for those who didn’t search the problems on the web.
but what about people who still got +ve delta and solved it by themselves ???
Codeforces Round #759 (Div. 2, based on Googling 2022 Elimination Round 3) much better
If you have to give such a name then replace Atcoder with Kattis as 2 problems were copied from there. You can replace Atcoder with Googling as well :)
I think the problems were not copied (most probably, the authors didn't even know the existence of those problems). Unfortunately, the probability of coming up with an already used problem is quite high. I invented at least $$$6$$$ problems that turned out to be already on the Internet.
I absolutely agree. It is impossible to foresee everything.
KAN getting all the negative contribution of down votes although he is neither among authors nor testers.
I doubt that he gives a shit
Hi, so to me seems like a notorious coincidence.
Добрый день. Мне кажется, что в задаче F решение за O(n^2) проходит системные тесты. Я отослал его во время дорешивания и получил вердикт "полное решение". Могу показать код решения или прикрепить ссылку на посылку.
Is this contest unrated?
If there's no claim "this contest will be unrated" , that will be rated.
The author wants to filter out O(nlogn) solution in E, but I got AC with O(nlognlogn) (query fenwick tree in binary search checking function)... I don't think a O(nlogn) solution is bad even if there exists linear solution.
Why the problem E are difficult to solve in O(nlogn)? I have done it for half a noon!
And then I used fread and got an AC
I just noticed that problem D is similar to AOJ 0448. https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0448
This contest:
i don't know where to clarify, so i post here yeah...
why i got rank 83 in these publish rating changes.
but my actual rank 74 (handle:Son) in common standing ??
because common standings only contain "trusted participants".
Why is rating relapsed? Recalculation? EDIT 3: it keeps on relapsing and fixing itself... strange.
Please increase the TL for E in practice at least by a few seconds. Non-standard IO optimisation shouldn't be the difference between AC and TLE.
This morning (GMT +7), I get a message from the system that my submission: https://codeforces.me/contest/1591/submission/138915027 for E is the same as some https://codeforces.me/contest/1591/submission/138907536, but actually I don't even know who this guy is, and after using a pbds, this problem is very easy to implement, and it seems like we have 0% of chance to share code with others and I don't see any reason to skip my contest this time.
did this round became unrated ?? since my pointes got reduced if this gets unrated I don't like the logic if people like me who solved this contest without the help of google or anything got +ve delta are getting 0 I know it's bad for many people but still some people will still suffer from making it unrated
Здравствуйте! Я получил письмо от [email protected] о том, что решения wynell/138917073, SUPERustam/138918045 находятся в группе одинаковых решений и о том, что при имении общего источника, опубликованного до соревнования, необходимо написать комментарий к посту со всеми деталями. Чем, в общем, я сейчас и занимаюсь. Я использовал материалы из этого файла (https://github.com/Petrivah/youtube-caption-scraper/blob/master/src/olympiad.md). Возможно, этим же файлом пользовался и SUPERustam и система посчитала это достаточным совпадением. Хотел бы вернуть баллы за эту задачу, я был очень рад, когда ее решил.
Пожалуйста, не тратьте наше время. У вас совпадают даже 2 решения:
The problem 1585F is same as ARC115E...