Блог пользователя Vladosiya

Автор Vladosiya, 3 года назад, По-русски

Привет! В 04.04.2023 17:35 (Московское время) начнётся Codeforces Round 863 (Div. 3) — очередной Codeforces раунд для третьего дивизиона. В этом раунде будет 6-8 задач, которые подобраны по сложности так, чтобы составить интересное соревнование для участников с рейтингами до 1600. Однако все желающие, чей рейтинг 1600 и выше могут зарегистрироваться на раунд вне конкурса.

Раунд пройдет по правилам образовательных раундов. Таким образом, во время раунда задачи будут тестироваться на предварительных тестах, а после раунда будет 12-ти часовая фаза открытых взломов. Мы постарались сделать приличные тесты — так же как и вы, мы будем расстроены, если у многих будут падать решения после окончания контеста.

Вам будет предложено 6-8 задач и 2 часа 15 минут на их решение.

Штраф за неверную попытку в этом раунде будет равняться 10 минутам.

Напоминаем, что в таблицу официальных результатов попадут только достоверные участники третьего дивизиона. Как написано по ссылке — это вынужденная мера для борьбы с неспортивным поведением. Для квалификации в качестве достоверного участника третьего дивизиона надо:

  • принять участие не менее чем в пяти рейтинговых раундах (и решить в каждом из них хотя бы одну задачу)
  • не иметь в рейтинге точку 1900 или выше.

Независимо от того являетесь вы достоверными участниками третьего дивизиона или нет, если ваш рейтинг менее 1600, то раунд для вас будет рейтинговым.

Спасибо MikeMirzayanov за платформы, помощь с идеями для задач и координацией нашей работы. Задачи были придуманы и написаны командой Университета ИТМО: MikeMirzayanov, myav, Aris, Gornak40, ibraevdmitriy и Vladosiya.

Также большое спасибо: Sugar_fan, doreshnikov, powergee101, pashka, KseniaShk, 74TrAkToR, stefanbalaz2, playerr17, diskoteka, FiniteMoves, nigus, erankyun, plourde27, Be_dos, donghoony, lucasxia01, Jostic11, sansen, gigabuffoon, akulenok, pwned, vrintle за тестирование раунда и весьма полезные замечания. Список тестеров будет пополняться.

Всем удачи!

UPD: Разбор

  • Проголосовать: нравится
  • +38
  • Проголосовать: не нравится

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +20 Проголосовать: не нравится

4 is my lucky number though :)

»
3 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

случайно поставил минус, я думал это див2 2 апреля

»
3 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Finally a Div 3 after a month :)

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i hate kanye west

»
3 года назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

how I can be a tester? plz don't downvote me, I just want to know :((

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I just want to know that will the hacking a solution improves ranking of the user in contest ??

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

All the best to everyone may this be you last div3 and you all become experts :)

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Scoring distribution should be added..!

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hopefully I'm able to participate.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I hope that it will be my last div 3 round :)

»
3 года назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

I registered for the contest before I became an expert, will this round still be rated for me? I ask this because I don't see an asterisk(*) next to my name in the registered participants' list.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +38 Проголосовать: не нравится

as a tester , I can assure that problems are challenging enough and there is hardly any problem which is a cakewalk and recommend to read all the problems

»
3 года назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Legendary grandmaster to test Div3. No need to have open hacking :).

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

As a tester...! wait a minute, something ain't right

»
3 года назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Hope to become Expert again

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

At last a Div. 3, a good opportunity for improve rating.

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +12 Проголосовать: не нравится

Need more frequent Div.3 contests for beginners.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

lessgo..

»
3 года назад, скрыть # |
 
Проголосовать: нравится +38 Проголосовать: не нравится

As a tester, I feel that the problems are very interesting and everyone should participate in this round.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hope to become pupil today!

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

hoping for Expert

»
3 года назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Is it Div2.25?

»
3 года назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

came back here in the middle of the contest, just to downvote. what kind of div 3 is that?

»
3 года назад, скрыть # |
 
Проголосовать: нравится -25 Проголосовать: не нравится

I don't think this round is too hard for a Div. 3 Round after AKing it, I think it normal and DE is even too easy for their place.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

worst Div. 3 contest ever.

»
3 года назад, скрыть # |
 
Проголосовать: нравится -20 Проголосовать: не нравится

Nice problems except for F. F is simply a trash problem.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

should i register for contest for 1minute i think i can solve all problems in 1min

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is there any way to solve "Living Sequence" without digit dp ?

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -8 Проголосовать: не нравится

[deleted]

»
3 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

khatam

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -22 Проголосовать: не нравится

[.]

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve C?

»
3 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

G1 was much easier than C/D/F

»
3 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится +24 Проголосовать: не нравится

This round was pretty interesting for me. Found C much harder than D. Although I did copy E after googling from here, had an insane last minute adrenaline rush trying to guess/brute-force necessary conditions for flower graph in F!

Thanks for the interesting problems — will go and prove F now :blobsweat: Update: hacked lmao

image

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +13 Проголосовать: не нравится

chromate00 Orz for the great performance!

»
3 года назад, скрыть # |
Rev. 4  
Проголосовать: нравится -6 Проголосовать: не нравится

I dont think problem D is a good problem that if you know the conclusion fn*fn+1=f0*f0+f1*f1+...+fn*fn, it will be very easy to solve it, otherwise it's very difficult. Although it's a comman conclusion.

»
3 года назад, скрыть # |
Rev. 5  
Проголосовать: нравится +1 Проголосовать: не нравится

Why my code tle at test 24 in G1, i think it's pretty decent enough to pass, just running 2 dp's one for maximum length and second one to calculate answers. Please help submission:200780428

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

for problem C, How can you get output for this test case 0 1 2 1 0 ? the described constrains were incomplete I think.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

This is probably my worst-ever performance in a div 3 contest, never felt more let down in my coding...lol!

»
3 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I'm curious about there will be how many FST of problem F.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Problem E editorial: https://oeis.org/A052406

»
3 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится -44 Проголосовать: не нравится

Problem :- 863A Insert Digits Solution is here with explanation and code of it

https://codeforcer.blogspot.com/2023/04/problem-863a-insert-digit-full-detailed.html

Problem :- 863C Restore the array Solution is here with explanation and code of it

https://codeforcer.blogspot.com/2023/04/problem-863c-restore-array-full.html

Problem :- 863D Umka and a Long Flight Solution is here with explanation and code of it

https://codeforcer.blogspot.com/2023/04/problem-863d-umka-and-long-flight-full.html

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

E maybe little tricky,but others are interestring. And feel the difficulty of D than that of E.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

E maybe little tricky,but others are interestring. And I feel the difficulty of D than that of E.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In problem statement of D. Umka and a Long Flight it states,"A checkered rectangle with a height of Fn and a width of Fn+1" means width always greater then height. Then, how can y be y > Fn at test case 3 (3 1 4 , output: YES)? n=3 x & y should x<=5 and y<=3. what did I miss?

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone provide an unofficial editorial for problem C?

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Well, E is really tricky and F is a little trash.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Nice problemset. I like task D

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

E is classical and F is kind of bad.

BCD are nice problems.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

The person who came up with problem b should be beheaded!!!

»
3 года назад, скрыть # |
Rev. 5  
Проголосовать: нравится +21 Проголосовать: не нравится

A: Find the first digit less than d and insert d before it. If there's no such digit, insert at the end.

B: We need to find there are how many cycles between start and end. Let's number cycles from outside to inside 0, 1, 2, ... then (x, y) is contained in cycle min(x-1, n-x, y-1, n-y). Then the answer is the difference of cycle number of start and end.

C: b[1], min(b[1], b[2]), min(b[2], b[3]), ..., min(b[n-2], b[n-1]), b[n-1] is an answer.

D: If n<=1 answer is true. Otherwise, let h=fib[n], w=fib[n+1], we must cut a h*h square from left or right. If we cut from left and (x, y) is remained in the right part, which is a fibonacci ractangle of order n-1, we can solve the problem recursively. Similar for we cut from right and (x, y) is remained in the left part. If no matter we cut the square from left or right, (x, y) can not be remained then answer is false.

E: Represent k in base-9, and add 1 to digits >=4.

F: First for a k-flower, number of nodes n=k*k and number of edges m=k*(k+1). Then there must be k nodes with degree 4, and other nodes with degree 2. If so, 4-nodes must form a cycle of size k (we can take all edges between 4-nodes and check if they're a cycle), and all other edges must form k cycles of size k, and each cycle contains one 4-node and k-1 2-nodes.

G: First calculate prefix-sums of occurences of each number in range [1, n]. We first run dp for max_size[i]=(max size of nice path end at i). Let max_size[0]=0, and for max_size[i], we check for each 0<=j<i, if there're at least k occurences of c[i] in range [j+1, i], we update max_size[i] with max_size[j]+k. Then we let dp[i]=(count of nice paths of size max_size[i] end at i). Let dp[0]=1 and dp[i]=0 (1<=i<=n) at first. Then for each j<i, if max_size[i]-k==max_size[j], we have dp[j] ways to choose first max_size[i]-k elements, and we have C(cnt, k-1) ways to choose other k elements (here cnt is count of occurences of c[i] in range [j+1, i-1], we can calculate it by prefix-sums).

»
3 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

How to solve Problem D

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +55 Проголосовать: не нравится

Is the validator of problem A wrong?

It says $$$1\leq n\leq 2\times 10^5$$$ in the problem statement, but when I hacked with n = 2e5, it showed

" Validator 'validator.exe' returns exit code 3 [FAIL Integer parameter [name=n] equals to 200000, ...e range [1, 10000] (test case 1, stdin, line 2)] ".

Also, I think the pretests are weak too, $$$O(n^2)$$$ and $$$O(n^2\times\log(n))$$$ solution can pass.

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +93 Проголосовать: не нравится

What the fucking description of F!

»
3 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

https://www.geeksforgeeks.org/finding-the-nth-term-in-a-sequence-formed-by-removing-digit-k-from-natural-numbers/

Problem E has striking similarity with above gfg article. Maximum users have googled it and copied the snippet of this article as it is without any changes. Please try to filter out those code solutions while checking for plagiarism. MikeMirzayanov

»
3 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Numerous individuals have replicated content from YouTube, and it is imperative that Codeforces takes action regarding this issue.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится
»
3 года назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

F is quiet confusing.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Great Contest, couldnt solve many questions in the contest but as i upsolve, i realize that the problems were really good.

»
3 года назад, скрыть # |
 
Проголосовать: нравится -21 Проголосовать: не нравится

make it unrated

»
3 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Can someone provide a counter example for this submission?

»
3 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

there is some issue with testcases of A problem.
N <= 2e5
but in hacking phase, i could not generate testcases where N > 10000

»
3 года назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

Div.(2+1e-6) round.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

One other way to do E is my considering 9 based numbers instead of 10 based(decimal) numbers. Convert k to a 9 based number and change all 4's to 5, 5's to 6, 6's to 7, 7's to 8 and 8's to 9

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I was trying to hack A, but getting the following error!

Validator 'validator.exe' returns exit code 3 [FAIL Integer parameter [name=n] equals to 200000, ...e range [1, 10000] (test case 1, stdin, line 2)]

»
3 года назад, скрыть # |
 
Проголосовать: нравится -12 Проголосовать: не нравится

i guess this contest should be unrated as solution to problem E was available online and a lot of people just straight away copied the code!! Link:https://stackoverflow.com/questions/54851335/program-to-compute-n-th-number-that-doesnt-contain-given-digit

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I think there is a mistake in the G2 problem's tests ( 29th test ), in my opinion the answer is at least 1, but the right output for the 29th test is 0. Can anyone explain how is it possible? My submission

»
3 года назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

An alternative solution of C, which might be easier to come up with (compared to the $$$(b_1,min(b_1,b_2)...)$$$ solution):

First note that if $$$b_i \gt b_{i+1}$$$, we must have $$$a_i = b_i$$$, otherwise if $$$a_{i+1} = b_i$$$ then $$$b_{i+1} \geq b_i$$$. Similarly, if $$$b_i \lt b_{i+1}$$$, then we must have $$$a_{i+2} = b_{i+1}$$$.

After doing one pass and dealing with these cases, there may still be some $$$a_i$$$ that are left assigned. Now we check whether for each $$$b_i$$$, at least one of $$$a_i$$$ and $$$a_{i+1}$$$ is equal to $$$b_{i}$$$. If not, we assign them. If we traverse in increasing i, we assign $$$b_i$$$ to $$$a_i$$$ first, and if $$$a_i$$$ is already filled we assign to $$$a_{i+1}$$$. In optimization terms, we make sure all constriant are active.

Finally fill the rest with 0.

This always works if the input is correct.

solution: https://mirror.codeforces.com/contest/1811/submission/200724266

»
3 года назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

So, problems B and D ruined the contest, right?

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Are submissions going to be re-tested with successful hacks?

»
3 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

So hard div3,(sad).

»
3 года назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

seems that few people will pass F

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I wonder when can rating changes be calculated,though I'm unrated :)

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

When do the ratings update??

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

There is code available for problem E before contest? Is it ok to submit that code during contest.

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +2 Проголосовать: не нравится

It is just sad to know Problem E’s code was available on the Internet and many people have copied directly from there. First time downvoting any post on CF.

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +2 Проголосовать: не нравится

toooooooooooooooooooooooooooooo hard 4 div3

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

When will the system testing perform???

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -10 Проголосовать: не нравится

This round is hard for me.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

at this point, i wanna become an expert to never participate in a rated div 3 ever again..

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone explain it to me, yesterday I solved 5 questions in Div 3, cf predictor showed an increase in rating, but now when I go and see the contest page it shows 1 solution submitted wrong and a decrease of -24 in my rating

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In problem A, why the maximum $$$n$$$ in pretests is less than $$$10^5$$$? I don't think pretests should be like this.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I think most people who step on it are because of A or F

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone explain to me why in Problem G,the output of example(fifth example) "n=5,k=1 1 2 3 4 5" is 1?I thought the maximum length is 1,and 1,2,3,4,5 are both nice paths.So I think the answer of it should be 5.

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Was this round rated, i have accepted submission but my rating haven't been updated yet

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

why ratings are not visible till now for this round

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

This server has been crashing for few months already. either fix this or make contests unrated.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I just received this message:

Attention!

Your solution 200772354 for the problem 1811B significantly coincides with solutions IshaanKapoor/200738434, kaiboy/200772354. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://mirror.codeforces.com/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

I just want to say that I never cheated. Your accusation is false. As a protest, I will not touch any problems A, B, C from divisions 2, 3, 4 anymore.