Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

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

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

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

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

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

Штраф за неверную попытку в этом раунде (и последующих Div. 3 раундах) будет равняться 10 минутам.

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

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

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

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

Также большое спасибо Kirill22 , allvik66 , Fortin , Artem_Sukharev , vsinitsynav , yorky , oversolver , majorro , ilya_totl , Undying , olya.masaeva , Kniaz , Golovanov399 , farmerboy , Absyarka , Kavaliro , neeraj_joshi за тестирование раунда и весьма полезные замечания.

Всем удачи!

UPD:Разбор

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

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

as a tester, I want to say that I've waited for invite so long... and finally got it!

also, expect interesting problems :)

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

All the best everyone hope everyone gets a positive delta

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

Иногда выдаётся возможность писать раунды в прошлом, главное просто захотеть.

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

hope a good delta positive this time.

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

As a contestant, I want to say good luck to all contestants

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

Finally Dream come true!! . Now i can finally give div3 as an unrated participant !!. It took 1 year for this moment.

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

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

div 3 and div 4 are good contests for newbie participants

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

六国は、軍が破壊されていない賄賂秦賄賂秦と破壊の方法の電力損失で良い戦いの欠点はまた、六国は、賄賂秦のはい、強い支持の損失を買収するために互いの速度を失ったと言った賄賂秦の欠点も攻撃して外に取ることは秦が得ると勝利と得るより邑大実際に百倍の死と敗北と死実際にまた百倍の偉大な悩みの領主は最初の祖父 嵐 霜露カット考えるには戦争ではありません初代の祖父は小さな土地を持つために茨を切り、その子孫はそれを草の浪費と見て、今日は5都市、明日は10都市を切り、秦軍が来る間、安心して寝て四領を眺めることができたのです燕・趙の王は、秦に賄賂を贈らず、自分の国を守る遠大な戦略を持っていたので、燕は小国ではあったが、後に滅亡した三国志が秦に付かず、刺客もいないのであれば、勝敗の数、生存の理由も秦に比べれば簡単には測れないかもしれません世界から六国崩しの話を取り上げると、また六国の下になる

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

All the best everyone . Hope all of you get a positive delta

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

First unrated div 3. Yay:)

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

Its a Div3 round and so nice to see that not a single tester is < 1600 . Is the round really meant for div3 ? What is the need to include so many high rated testers and not a single < 1600 tester ?

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

Div3 round yayy !! Is the round really meant for Div3 when we can see no tester who is <1600 ...

Also what is the point in including so many high rated testers and not a single <1600 tester ?

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

Goodluck to Baaaraa

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

Hope good practice and new colors for all rated participants

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

!Unrated for me too :D

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

i am always ready for the div3 with my cup of tea

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

I didn't participate in 5 rated rounds and my rating is below 1600 can I participate??

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

I wish that every Chinese student can get good grades in Gaokao!

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

how to do E?

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

    Try to think about case : how does answer change if we pick such $$$(i,j)$$$ that $$$(A_i$$$ $$$mod$$$ $$$k)$$$ $$$+$$$ $$$(A_j$$$ $$$mod$$$ $$$k)$$$ $$$ \gt =k$$$ .

    For example : $$$k=3$$$

    $$$A:{1,2,4,5}$$$

    matching $$$(1,5),(2,4)$$$ gives answer $$$4$$$ and matching $$$(1,4),(2,5)$$$ gives $$$3$$$

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

    for each value a[i], a[i]/k will always be there in the total answer. So, we can add a[i]/k for all i. Then, in another array we store a[i]%k. Now, the maximum sum of two of the remainders of a[i] and k is 2k-2. And (2k-2)/k is 1. So we have to find the number of pairs that we can form (from the remainders) such that their sum is greater than or equal to k. We can do this using greedy + two pointers. My solution — https://mirror.codeforces.com/contest/1690/submission/159852372

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

I think the authors are very much interested in permutation graph this is 4th instance in last one month I find same kind of question F

https://atcoder.jp/contests/abc247/tasks/abc247_f

https://mirror.codeforces.com/contest/1678/problem/E

https://mirror.codeforces.com/contest/1670/problem/C

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

How do you solve F and G?

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

How to solve the edge case for F while solving for LCM of each cycle?

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

Speedforces

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

ones who solved C are more than ones who solved B !!

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

The pedestal consists of 3 platforms for 2-nd, 1-st and 3-rd places respectively.
it's the first time in cp history to see the above misleading description ,why it can't be 1-st ,2-nd and 3-rd!

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

For problem A, can the problem statement use $$$h_1, h_2, h_3$$$ instead of $$$h_2, h_1, h_3$$$ ? Putting some formal definition helps too like

  • $$$h_1 + h_2 + h_3 = n$$$
  • $$$h_3 \lt h_1 \lt h_2$$$
  • $$$h_i \gt 0$$$ $$$(1 ≤ i ≤ 3)$$$
  • $$$h_2$$$ is minimized

Took me a while to understand the problem statement itself

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

help me solve E,
if it is greddy then write proff of correctness
or give me some tips on how to think on this kind of question

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

Not able to pass E's Test case 3. Anybody has a hint??

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

why is this giving WA?? what's test 2 :( code

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

How to solve E ?

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

    we need to maximize floor((a[i] + a[j]) / k)

    floor((a[i] + a[j]) / k) = a[i] / k + a[j] / k + (a[i] % k + a[j] % k) / k -> (1)

    => we need to maximize (1)

    a[i] / k and a[j] / k are constants, so we cannot maximize them. Therefore, they directly contribute to the answer.

    => we only need to maximize (a[i] % k + a[j] % k) / k

    The above expression can be maximized when the numerator is maximum since the denominator is constant.

    => now we need to maximize (a[i] % k + a[j] % k). This can be done by an approach similar to two-sum where we try to pair the smallest remaining element with the largest remaining element such that their sum is >= k (because only then the sum can contribute towards the answer)

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

Hey guys, could anyone of you help me out real quick? Speaking of problem F...

This is my submission: 159858692. I count the lengths of all cycles and see whether this cycle really changes anything in the string, if so — I include it while LCMing all valid cycles.

What did I miss here? I am thinking of some cycles of substrings like "baba". Is that the case or anything else?

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

Does the time taken to solve questions matter in div 3 & div 4 contests?
Like if 2 people solve the same number of questions, do they get the same rank or does the one who took less time to solve them get a higher rank?

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

If the equal cycles of a string are its periods then what is KMP made for???
I remember using this above rule in an atcoder contest, but I forgot it today due to knowing what KMP does

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

EDIT : Got the failing test case. Thanks!

Can someone tell me why my code : https://mirror.codeforces.com/contest/1690/submission/159863108 is giving index out of bounds, also do tell the test case that is failing. Thanks!

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

Nice round! and very educational.

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

Emmm....Why I am an official participant with rating 1601?!?

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

For problem F I have counted length of all cycles and also the stored the text string formed for each cycle and then simply use Longest prefix suffix logic to find if there is a repeating pattern so as to find min iterations in which cycle loops back to initial value and finally I have taken lcm of all these values.

But still it is giving WA. Can anyone please help me figure out what's wrong in my approach? :(

Link to my solution

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

logicforces

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

Hi! Why does this submission 159869794 get AC, but this 159757251 — WA?

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

    This kind of bugs is one of nightmares in java. Remember that ArrayList returns Integer, not int. You should use equals instead of ==, when you are comparing Integer with Integer. In your AC code, you compared Integer with int, so it was fine.

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

How to solve G

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

How to solve D??

I tried to iterat through all substrings of length K and count the 'W' cahr and every time update the ans with ans=min(ans,cnt)

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

image

B WAAAAAA

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

In problem F, how do I find cycle for an alphabet?

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

I'm gonna become blue now, thx

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

Is there a possibility that the answer for F exceeds $$$10^{18}$$$?

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

although I didn't participate in this contest,I doubt that it is much too easy,since there're more than 300 people AK it.

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

My Rating was 973 initially, still this contest is showing unrated for me. Why so ?

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

How to solve G

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

Can someone tell me why f is wrong in the 100th of the second example?Thanks you!

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

Почему у меня, достоверного участника див 3, во вкладке профиля соревнования не стоит место и плюс/минус рейтинг?

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

Will the editorial be released for this?

Its been around 13 hours since its completion.

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

After giving the contest, why am I still unrated?? This was my first contest.

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

Ratings are not updated yet?

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

wHeRE EdiToRiaLl?

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

why it is showing unrated till now

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

I think given explanation of example in E is wrong. Please correct me, if I am missing something.

Example is, n=6,k=3, weights of goods a=[3,2,7,1,4,8]

We have to pack them into n/2 packages, ie. two goods in each package, and such that total cost is minimised, where cost is [weight_of_package/k], (ROUNDED DOWN).

So, "according to me", they should be packed into these packages: [7,1] (cost=8/3 = 2), [3,2] (cost=5/3 = 1), and [4,8] (cost=12/3 = 4)

So, cost should be 2+1+4 = 7. (This is the minimum I can get)

But in example the minimum cost given is 8. How ? Or there's some caveat in my approach ?

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

I had a doubt. Is this contest unrated. My rating is less than 1600 and I have given 5 rated contests before.Have the ratings been applied yet?

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

why weak pretests on E.

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

First 3-digit placement, yay! :D Thank you for this contest! <3

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

This is my submission for E, why getting TLE, complexity seems to be O(n+k^2) to me which should be fine, https://mirror.codeforces.com/contest/1690/submission/159917329

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

Can someone plz tell me why is this code failing at test 2? "problem B" https://mirror.codeforces.com/contest/1690/submission/159826598

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

    Consider the case, a=[6 5 7] and b=[0 0 2]. Here, your logic will give output as yes as it first compares for 6,5 and then for 5,7 but the correct output shall be No. Understand why this problem arises and Modify your logic to correct it.

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

    The first mistake syntax error you are doing is that (if(su[i]==su[i-1]) continue;). this condition can give you index out of bound for i=0, and accessing su[0-1] = s[-1].

    The test case where your code is when you need to compare the difference of current ith to greater previous than last one. i.e 1 4 5 1 2 5 1 0 0 0

    Expected : NO OUTPUT: YES

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

still not updated the ratings ..... it's been more than 17 hours since it got finished.

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

My solution for F was accepted in Python but not in PyPy3

ಥ_ಥ

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

Attention!

Your solution 159836981 for the problem 1690F significantly coincides with solutions Pretest2/159836252, Ksathwik03/159836981. 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 have referred and used the template provided by gfg (https://www.geeksforgeeks.org/minimum-rotations-required-to-get-the-same-string-set-2/) which has been published before the start of the contest ,to solve the problem of of minimum rotations to get back the original string i did not use any unfair means or copied the solution you can check our both code they are completely different except for that rotation string part. [user:https://mirror.codeforces.com/profile/MikeMirzayanov] i request you to please check and do the needful :).

I would like to mention that the account with whom i was (plagiarized)[https://mirror.codeforces.com/profile/Pretest2] , his rating got increased whereas my rating wasn't

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

I am amazed how many participants are discussing their "missed" rating change instead of solving unsolved problems.

$$$P.S.$$$ It's simple, if there was no announcement that round have became unrated, you should just wait a bit.

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

my rating is less than 1600 so if i am right this round should be rated for me but why is this contest not showing in rated graph? and my rating too remained unchanged.

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

Rating update is slow(;′⌒`)

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

wth !! It's unrated for everyone . You can see in your graph in the profile ,change to all contests .

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

May I know will there be any Editorial for the contest. It is my first contest and I only solve 4 lol~ It is a fun and beginner-friendly contest.

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

When will the ratings get updated?

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

Hey Vladosiya, MikeMirzayanov

I just recieved a message saying that my solution in the last div.3 contest coincided with Time_to_pass. I'm mistakenly accused of cheating in #797 (Div. 3).

I swear that I didn't cheat in the contest, and all the codes in this contest are 100% written by me. Both were my IDs only. I tried solving it from another ID to avoid penalty. I know it was not never a good habit. I will not be doing these silly things onwards. I apologize for my mistake. I have given around 30 contests and this is the first time I have done this. Please help me. [I can give proof if needed about the IDs ownership]

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

Who else got bamboozled by F and did union find only to get a wrong answer and not knowing why Only after contest, then realised its a directed graph and uf cannot be applied here

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

Dear MikeMirzayanov,

Sir my rating get changed even though it should be unrated for me can you check this as it will be unfair for others.

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

hello admins I have just received a message saying my solution 159822431 for the problem 1690B significantly coincides with solutions 7878797/159821282.It was unintentionally because I have used ideone.com and I am totally unaware of that because till now I have given few contests on Codeforces using VScode and this was the first time I have used ideone.com because of some updation required in vscode. And I have checked 7878797 user id recently and I have found that this id is having its rating skipped in its previous contest also and one more thing is that this id have used different templates of code in every question, these two things are enough to know that user id 7878797 is a cheater and have copied my solution of 1690B which was totally written by me. So, I am totally innocent and hence this is my humble request to give me my ratings back and now onwards I will totally follow the instructions of which I was unaware previously. Thank you

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

Hi Admin, ( Vladosiya , MikeMirzayanov )

I received a message regarding the contest Codeforces Round 797 (Div. 3) saying that: my solution for the 1690E - Price Maximization coincides with about 11 other people. - I'm a newbie here and I don't know many people, so cheating/copying is unethical and impossible for me. I've realized what mistake I did. I use ideone.com and other open judges (for this contest I used ideone) to test my solution on sample cases, didn't know that people could copy down answers/solutions from ideone.com. I know this is a clear rules violation as per unintentional leakage, however, I was totally unaware of it. I'm really sorry about this and I'll make sure to use only local and private testing systems in the future. I went through the solutions of the people mentioned and noticed that they had copied the code, with some modifications, which is unfair for me. Can you please look into this and return my ratings, I had a decent positive delta. It'll really boost my morale. Thanks.