Привет!
VK Cup 2022 - Отборочный раунд (Engine) начнётся уже скоро: 15.01.2023 15:05 (Московское время). Это соревнование предназначено для тех, кто решил хотя бы 6 задач из 8 в квалификационном раунде VK Cup 2022. Раунд будет рейтинговым.
Остальных приглашаем на открытый для всех Codeforces Round #844 (Div. 1 + Div. 2, основан на Отборочном раунде VK Cup 2022), который начнётся в то же время и тоже будет рейтинговым.
Все задачи придуманы и подготовлены мной. Также этот раунд стал лучше благодаря KAN, errorgorn, lperovskaya, dario2994, Monogon, Arpa.
Участникам будет предложено 8 задач и 3 часа на их решение.
64 лучших участника закрытого отборочного раунда получат фирменные футболки VK Cup, а 16 лучших пройдут в финал и смогут побороться за призы 4-5 февраля очно в офисе VK или онлайн:
- 1-е место — 300 000 рублей;
- 2-е место — 250 000 рублей;
- 3-е место — 150 000 рублей;
- 4-е место — 100 000 рублей.
UPD: Разбор
Поздравляем победителей отборочного раунда:
и остальных участников, попавших в число сильнейших.
Также поздравляем победителей открытого для всех раунда:
и отдельно maroonrk как автора единственного принятого решения по задаче H2.
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
我的天啊我打破了你愚蠢的锁链!
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
haha broke your silly chain
haha restarted the silly chain.
Omg tourist round.
You do realise I can just break it once it reaches a significant length again?
You do realize that I can just restart it once you break it again?
if(no_of_chain_makers > chain_breakers) cout<<"Relax"<<endl;
Now for everyone's sake,Im restarting the chain again. Thank's for the support guys.
Omg turist round.
You do realise that I can just break it once again?
I'll start again.
Omg turist round.
Omg turist round.
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round.
omg tourist round
omg tourist round
omg tourist round
omg tourist round
Omg tourist round.
Omg tourist round
omg tourist round
Omg tourist round.
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg round tourist
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
OMG tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
Omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
HaHa! I broke your silly chain.
Ha Ha! and i started it again.
omg tourist round.
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
We need more!
omg tourist round
omg tourist round
OMG Tourist Round !
omg tourist round
Notice the unusual time
omg tourist round !!
omg tourist round
omg tourist round
OMG tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
omg tourist round
no
If it's possible can you please explain how did you get Specialist Rank?
omg tourist round
omg tourist round~my love
omg tourist round
omg tourist round
omg tourist round
Damn, 3 hours for only 8 problems. Scary
omg tourist round
omg tourist round
omg tourist round
I am so interested in your graph, how did you maintain a slope of 45 degrees ?
وانتا مالك؟؟
What language is this, looks Arabic I don't know it. Speak in English. Also, I expressed my interest in speedy_boy graph NOT yours. Actually, your graph isn't interesting at all mr.newbie! The comment directed to you is below : Newbie detected, opinion rejected XD
Respect to newbie
yes sir. all due respect! but he seems talking in a rude manner to me by a foreign language tho I didnt talk to him and replied to ur comment only :-( However, your graph with slope 45 is so cool ✪ω✪ speedy_boy
For your first 6 contests, you actually start at 1400, and as you do contests your hidden rating is updated as normal and your shown rating rises rapidly-ish to reach it.
He didn't maintain it after this contest though, if he did he should be orange by now.
newbie detected.. opinion rejected xD
Надеюсь, будет задача про All Cups
Shortest announcement ever *_*
Yes, hope the problem statements will be short as well. :D
Also the most upvoted one :)
Not even close...
(although this might still not be the most upvoted one)
damn!
its revenge
Tourist can't compete against benq in this round, but he can make some crazy geometry problems to force benq to lose rating and get back to rank #1.
What an wonderful Opportunity. Haha to be crowned again.
This contest is only for Russians ig.
Yes VK Cup is for Russians, but this is a mirror of this contest and everyone can participate.
What a great idea
good
Benq is a fair contestant, he's like:" Amma beat him while he's participating"
3 hours? How difficult the problems will be
now you know
Maybe my "master experience card" will be expired in this contest.
talent, and nice avatar
I don't care about the difficulty lvl of the problems if it's Tourist Round. All i know that it is going to be fun.
Note the unusual timing
omg tourist round ...^,^
haha,that’s right
yes,its correct.
absolutely right,haha
Guess will have to wait for tourist vs Benq :-(
what you guys think Benq gonna or not gonna participate this contest?
what you guys think is Benq gonna or not gonna participate this contest?
Benq will not participate, because tourist has intentionally made problems with topics where Benq is weak. This is to make Benq fall to second place in top rating chart, so that tourist can become #1 again.
xD
Oh,man !! Is there any topic on earth in which these legendary guys are weak?
I don't know, maybe some optimization of matrix multiplication algorithm from $$$O(n^{2.43})$$$ to $$$O(n^{2.42})$$$.
To make benq lose rating you have to specifically make it hard for him. If it’s hard for everyone he won’t lose rating.
But Benq is better...
I think Benq only wanna compete with tourist who is well-known as the No.1 in competitive programming. In my opinion, he will not participate contests without tourist such as this contest
Tomorrow i will miss Benq vs tourist but no worries because later they will be facing each other soon
Benq only compete with tourist in the contest.
Benq only participate in the contest in which tourist participate.
omg 3hr round ><
Omg 3hr Round ><
I think, Benq will not perticipate in this contest. But I will participate and face to the world number one Programme's problems...☝️
Score distribution.......???
I'm crazy.
Who said you are not Crazy?
omg tourist round
omg tourist round
omg tourist round
omg tourist round
Omg clash with ABC.
I am a pro memer.
.
My IQ has decreased by 20 points while trying to read this. Thanks.
This is the shortest announcement for a round that I have ever seen :))
Legend don't need to say much. Their presence is enough alone sir!
Who is tourist ?!!
omg tourist round . Probme 1 will be 1200+ Rated now
Nope. It was 800 Geometry. Haha
orz
It is rated ?(⊙﹏⊙)
well, obviously, sorry bother……
TFW you expect tourist to claim back first place then see that tourist himself is the author
.
It was good one . Don't know what's wrong ? Maybe too rude or offensive for some people ?? Atleast you should have blurred the authors above. It's disrespectful for them.
Omg, tourist round!
Contest Clashing with atcoder Beginner Contest 285.
Tourist round >>> Any Other round on this planet. As Simple as that .
I might just end up top1 because problems are being designed by tourist.
omg tourist round
tourist revealed.
when I saw by tourist, inner me: Don't worry, Better luck next time!
Orz tourist round.
score distribution when?
omg tourist round
omg tourist round
omg tourist round
while(1) { OMG Tourist Round }
There will be very Interesting questions. Very Excited for the round!!
GOAT
omg tourist round
omg tourist round
ok
omg tourist round
ОМГ. Раунд туриста.
Should be Interesting.
omg tourist round
Thanks to MikeMirzayanov for amazing platforms Codeforces and Polygon.Thnx to the community who made codeforce this goodomg tourist round
Contest Collision (CF & ABC):
AtCoder -> 17:30 IST
CF -> 17:35 IST
CF is based off VK cup. It can't ve postponed
omg tourist round
omg tourist round
i do bad in tourist rounds, hopefully this will change tomorrow
круто!
why problem in this year contests are didn't given any rating till now?
conflict with ABC285... what a pity that i can't participate in both contests...
That's right...
Your profile picture looks great
Note the unusual timing.
It's such a piece of cake for tourist to send out a splendid contest. & Just BY HIMSELF !!!!!!!!
excited !!
tourist gang
The One Piece is real!!!
Originally I am not planned to participate this contest because I have a date then. But when I see the author, I just postponed the date and register for this contest. Wish I can turn cyan once again.
You guys are having girlfriends!
Reference
omg tourist
I wish the next round will be written by Benq
Obviously tourist round will be full of fantastic problems. Good luck, yeah! ^=^
I will always be a fan of tourist!
AtCoder-ABC 285 and Round#844 Clash, I'm sad now :(
omg tourist round
OMT Gods round
It is briefly before the beginning of the round now, and score distribution hasnt been announced yet...
All the best guys! Lets see how much can I change my ratings today
PS:- I wish the change to be positive :)
is this rated for everyone?
yes
omg tourist round
Where is score distribution?
I think I may not be able to participate because I feel like going to the toilet right now. What a wrong timing. :(
glhf
scared!i hope i can solve A。。
OMG tourist round
I regret I couldnt participate in it as I got stuck with some personal work
А разбор будет сразу после раунда или чуть попозже?
omg tourist round
Why does the selection round of VK Сup start at the same time as the third selection round of the Technocup starts?
what to choose?
VK Cup...
or Technocup?
why the rating of H2 is higher than the rating of H1
it said that H2 is the hard version,doesn't it?
its not H1 vs H2 but rather H1 vs H1+H2
A solution for H2 always works for H1. So if you solve H2 you get the points for both.
oh
F is an amazing problem! couldn't code it in time though, but mindsolved it
Can somebody please tell the solution?
$$$dp[i][j]$$$ = $$$P$$$(Minimum Prefix $$$\geq$$$ $$$ -j $$$ )
In E, finding maximum total area is not that hard but finding the exact subrectangles seems quite difficult. Stuck on it's implementation. Any approach regarding the same?
Maintain a stack for the rightmost intervals for u, d, ud rectangles. It was very painful implementing this, especially when the contest started at 4am for my local time.
Hey, thanks. I just implemented the logic using your stack idea. Yeah, felt like handling a lot of cases!
My solution
Pretty hard contest.
No idea for D. Have idea for E but got WA. Now I'll return to CM.
how's C done ....?
It's pretty annoying. You need to consider all j that n is multiple of j, calculate how many char will be changed if you make the string to j kinds of different chars. You need consider 2 cases: j<j0 , j>=j0, where j0=the number of different chars in the initial string. If j<j0 you need change some chars with low frequency.
After you decided the optimal j, you need to add all chars you'll put to the final string into a "char pool" (implemented as int pool[26]), first try to make every chars remain the same(if(pool[s[i]]>0) pool[s[i]]--; flag[i]=true;) the assign i where flag[i]=false any char in the pool.
Well consider two indices i and j. now calculate all such x that make both a[i] + x and a[j] + x a perfect square. the rest should be easy
In E we can first shrink rectangles with same type (row1, row2, row1+row2) and then consider for each 2-height rectangle, shrink it if it's penetrated by any 1-height rectangle, and shrink every 1-height rectangles who doesn't penetrate it but cross with it.
However I got WA at pretest 15. Also C was very annoying. I spent about an hour for it.
What I did is calculate the answer firstly for two numbers, let's say a and b. We want to transform a into x^2 and b into (x+k)^2 (because b > a), and that means that $$$b-a = (x+k)^2 - x^2$$$, so $$$x = {(b-a-k^2)}/{(2k)}$$$. You can just try every k from 1 to sqrt(10^9) to see whether that k satisfy this condition, then, for each valid k, calculate the number of perfect squares you'd also obtain from the other numbers in the array.
Let's choose some x. If ai & aj becomes perfect square after adding x, then: $$$a_{i}$$$+x = $$$u^{2}$$$ & $$$a_{j}$$$+x = $$$v^{2}$$$ Substracting , we get $$$a_{i}$$$ — $$$a_{j}$$$ = $$$u^{2}$$$ — $$$v^{2}$$$
=> $$$a_{i}$$$ — $$$a_{j}$$$ = (u-v)*(u+v)
Now split ($$$a_{i}$$$ — $$$a_{j}$$$) into 2 factors f1 & f2 such that f1*f2 = $$$a_{i}$$$ — $$$a_{j}$$$.
So, f1 = u-v & f2=u+v.
Find, u from here. Substitute in $$$a_{i}$$$+x = $$$u^{2}$$$ & you will get x.
Find the count over all possible x in this way & take the minimum one.
I thought trying for every factor of a 10^9 number for 50*(50*49/2) times would cause TLE…
my thinking was similar to you though instead of tle i got wa
Now I upsolved D. My submission:189361440
The proof of that the submission is available:
In the algorithm we consider for all divisor k of (aj-ai) where j>i. The maximun number of divisors we check in one case is:
sum(1<=i<j<=n, sqrt(aj-ai)/2)
The "/2" is because if (aj-ai)%4==0 k must be even, if (aj-ai)%4==1 or 3 then k must be odd.
Notice that sum(a[i+1]-a[i])<=A (A=max(a[i])=10^9). We can see for each d, sum(1<=i<=i+d<=n, sqrt(a[i+d]-a[i])/2) is maximized when all a[i+d]-a[i] are same (can be proved by the mean value inequality) and the maximun value is about (n-d)*sqrt(A*d/n)/2=n*(1-t)*sqrt(A*t), where t=d/n. We sum up it for d=1...n-1 and the sum is about O(n^2*sqrt(A)), which fits the time limit.
Thanks my mate
It doesn't TLE, because you're factoring the differences of $$$a_i$$$ and $$$a_j$$$, all of which can't be around $$$10^9$$$ simultaneously.
it's around 4e7 operations (which should be doable even with 1s time limit), plus the time limit is 4s.
But for case a[i]=1+20408160*(i-1), it runs for 10622587 operations.
OHHHHH I forgoted there's this line in the statement:
I missed in the contest.... I've thought sum(n) could be 2500 and missed the intended solution.
I just upsolved D with a similar solution. I iterated over all n^2 pairs of numbers. For each number, i iterated over all values of f1 (so sqrt(max(a)) time) and did some math to see if it worked. Then I took all the possible values of x I got, and I simulated the process for each value of x.
have idea for D but got wa