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

Автор SlavicG, история, 5 лет назад, По-английски

Hello Codeforces!

magnus.hegdahl and I are glad to invite you to Codeforces Round 767 (Div. 1) and Codeforces Round 767 (Div. 2) which will be held on Jan/22/2022 17:35 (Moscow time)! This round is rated for both divisions.

In each division there will be 6 problems and 2 hours to solve them.

We would like to thank the following amazing people:

Score distribution:

Div. 2: $$$500$$$ — $$$750$$$ — $$$1250$$$ — $$$1500$$$ — $$$2000$$$ — ($$$1500$$$ — $$$1000$$$).

Div. 1: $$$500$$$ — $$$750$$$ — $$$1250$$$ — ($$$1000$$$ — $$$750$$$) — $$$2250$$$ — $$$3000$$$.

UPD1: competitive__programmer and namanbansal013 have prepared video editorials for most div. 2 problems that will be available on ak2006's channel and namanbansal013's stream

UPD2: Editorial is out!

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

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

As a tester, I am asking for your precious upvote.

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

As a tester, pls help I can't figure out a decent as a tester comment

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

As a tester, I think problems are great. I highly encourage you to participate in this contest and check out all the problems.

Tip: Having a cool profile picture like mine might help you do better :)

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

As the person who has seen the tester irl for 1 time I can say that he is very great dude (vanilla confirmed)

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

As a participant, thanks for putting the contest on a weekend!

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

As a Mihai supporter I wish all the Mihai supporters to get +300

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

upvote announcement blog or negative delta

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

Time to upsolve: https://codeforces.me/contest/1537

I actually did terrible that contest on vc and wish for more luck this weekend :prayge:

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

This is a very well prepared round!!!

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

As a tester, I would like to express my appreciation for the setters and coordinators for their efforts to make this round as enjoyable as it can be, and to invite everybody to participate in this contest!

P. S. also my salary is contribution plz upvote

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

as a tester, i'm late for commenting

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

as a tester, I think the problems are great. Recommend participation.

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

As a tester, the problems are interesting and you will enjoy thinking about them and solving them.

As the video editorialist for most div 2 and some div 1 problems I have tried to make the solutions intuitive and simple to understand so do subscribe to my channel

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

Yet another Mathforces contest O_o

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

Good luck! I wish every grey become green!

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

Looking forward to this round!

Wish everyone good luck&positive delta

Btw, that's a great score distribution

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

Good score distribution! Wish everyone good luck and positive delta)

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

As in this contest, having official video editorials for every contest will be a great idea. This will motivate the content creators in terms of money and views and will be good for the whole CP community as well!!!

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

As a tester, I had found that one of the problems could be solved by Googling. But now it's substituted with another great task, mission accomplished! Also, the round is really entertaining, please participate, remember to read all the problems and stay healthy <3

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

UpvotesForces

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

Wow that's quite a list of testers! Is it documented somewhere how to volunteer for testing a round?

I'll earnestly try to participate in yours, but, like most rounds, it's 6:35am in my timezone :|

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

glhf

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

Can't wait to see a new, well-prepared, interesting and fun cf round! GO-GO-GO SlavicG!

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

As a tester, I believe all of you will enjoy these excellent probelms.

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

mihai

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

Score distribution announced early.

Thanks

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

74TrAkToR is coordinator, so we should expect combinatoric problem which is in wrong order.

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

My gut feeling is saying that the problems in this contest gonna be very interesting, gonna get +ve delta

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

WA is certain but it doesn't have to be ugly

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

A palindrome round (767). Nice :)

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

Magnus from Norway. Sounds familiar to me...

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

Can we see Mihai in problemset?

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

First Norwegian round. (I think...) Let's go!!!

magnus.hegdahl orz

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

I wish you all to get repeated TLE's and passed pretest but gets failed in system testing may your code gets skipped and you get a minimum of -100. all the worst :) . may you get down by h whole level.

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

I am a new programming learner. I have just finished the basics of C programming. Can/Should I participate in this contest?

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

I hope the server won't break down again(

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

Wish all participants enjoy tasks and get higher ratings! ^-^

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

Hope this contest completes smoothly

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

Cheaters better not cheat. Else I'll whoop your ass

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

Good Luck peeps!!

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

abacaba

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

Why can't I submit my code?

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

in div2 F1 what does "score of the optimal game" mean? average of all the possible scores? SlavicG

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

I think that shuffling problems in div.1 is not a great idea.

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

Speedforces

Meme

How to solve div2E.
And is div2F1 some standard problem as some div1 participants solved that instead of div2E.

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

Ad-hoc-forces!

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

Problem A to D are too easy, especially Div1 D is much easier than usual .

And I have a O(nlog^2n) solution to E , but it got TLE . So Sad ...

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

Seems that Div.1 E has a way too strict TL? My $$$O(n\log^2 n)$$$ solution keeps going TLE. Or maybe the expected solution is $$$O(n\log n)$$$ then just ignore me.

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

How To solve C and D of Div2 ???

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

    D was DP i guess and I solved C as I build reverseMEx array(mex till i from n) and then brute-forced from being (might get TLE in sys testing)!

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

      If any of the strings in the list is a palindrome, the answer is yes! If there is either zyx | zy for any string xyz, then the answer is yes! The trick is to check for zy because we are only storing strings in hashmap. To do this, we find for every ch in small alphabets if reverse(zy(ch)) belongs to hashmap then the answer is yes! Otherwise, the answer is no.

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

    C: The basic idea here is to keep taking elements until the mex for the current set of taken elements cannot be increased by any element present in the remaining elements.

    Now to increase the mex of the current set of elements, mex itself is required to increase itself. So, I kept all the elements in a multiset and then checked if the mex of the current set of elements is present in the remaining elements or not. If it's not present then we can start a new set of elements from here. Else, just take the current element and then increase the mex till it can be increased.

    Now to increase the mex, I have created a hash table and put the current elements in there. Now, until the next element is not present in the hash table, keep increasing the mex. This is the basic idea. Code

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

    D was mostly observation.

    Trivial Case: If the input strings are palindrome, then return True.

    Observations:

    Now the palindromes that can be created will be of length at least 4. If you break a palindrome of a given length only in segments having 2 and 3 only. Then the first and last segment will also be of length 2 or 3. I can construct a palindrome out of the first and last segment only. So I can have the following combinations of lengths:

    • 3 3
    • 2 2
    • 2 3
    • 3 2

    Now all that's left to do is check if we can create a palindrome considering the current string as the last part.

    For this purpose, I can have previous strings in a set and then reverse the current string and check if it is present in the set or not. This part is easier said than done. Have a look at my implementation to understand it better. Code

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

I regret ever making fun of line trees, I didn't pass E because I had no template for them QAQ

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

Only If I got 30 more seconds I would have submitted D,!!

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

Great contest

but feel sad for sitting there trying to solve 2E for 70min but stuck at the last step

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

Is there a formula for 1628D2 - Game on Sum (Hard Version)?

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

    $$$O(m)$$$ formula (can maybe reduce to $$$O(1)$$$)) after preprocessing:

    $$$\displaystyle k * \sum_{a = 0}^{a = m} \frac{\binom{n - a - 1}{n - m - 1}}{2^{n - a}}$$$

    if $$$m \lt n$$$. If $$$m = n$$$ then the answer is simply $$$k * n$$$.

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

FML

I found an $$$O(n)$$$ formula for D2 instantly, but I kept treating $$$n, m, k$$$ as queries and completely forgot that $$$O(n)$$$ would just solve the problem...

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

I declare myself the dumbest person on this planet when I realized after 40 mins that string of length 1 is always a palindrome, so you only need to handle strings of length 2 and 3.

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

Can someone tell me what is wrong with this code for D? I broke it into cases...failed pretests Code

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

Problem div2 E is my favorite problem I've seen in recent memory. :)

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

How to solve div2 promblem E?Is it should be divided into 2 * 2 grids to solve?

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

I could think out diagonal XORsum of problem E 10 minutes before contest over. that was close

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

A-D great stuff, thanks!

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

Sometimes there are problems having very intuitive algorithms (but to prove their correctness requires time) so I'm wondering whether there are people eagerly submitting such intuitive algorithms without formally proving them. Those submissions still can get Accepted when they are lucky.

After participating in several contests at Codeforces, I realize that perhaps I have to submit things very quickly, without carefully thinking about their correctness, otherwise I will get a low rank because of late submissions.

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

    Do you think this is good? In other words, do you think it is common and acceptable to do such quick but not reliable submissions in competitive programming?

    (I don't like unreliable things, so I feel uncomfortable when I have to do such quick submissions.)

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

    -is-this-fft- mentioned his style of solving problems in this Blog

    Piece of text, Para4 in the blog

    I feel after a certain point it becomes difficult to solve problems without proving.

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

who did place hacks format before output format in 2E? WHO DID THAT?

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

loved the contest! strong pretests and amazing problems ... :)

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

Me reading Mihai as Mithai :)

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

I forgot to check if the given strings are palindrome and failed on Div 2 D

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

Peculiar Movie Preferences Video Solution.

Don't forget to like and subscribe!!

https://www.youtube.com/watch?v=xBkDyMHVTJ0

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

Does anyone realise that after a few hours there will be the first 4000+ rated user in entire history of codeforces?

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

очень классный раунд, спасибо авторам!

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

Ratings updated preliminarily. We will remove cheaters and update the ratings again soon!

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

Mihai is very abnormal person, i mean look at his movie choice.

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

My Submission Div2 C it is giving tle on test 5 can someone plzz help me out ??

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

Could someone please point out my mistake for div. 2 D? Here is my submission

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

As the Victor from 1628C - Grid Xor, why did you, mesanu, steal my grid????

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

I think the samples are strong . I like it.

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

My AC submission 143728411 for Div2 C/ Div1 A gives a runtime error on this test case:

1
2
3 4

I'm not sure why this happens. Could someone perhaps explain why this happens?

Update: Nvm, this test case isn't valid.

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

accidentally put this comment not in the editorial :/

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

Hey, Div 2 Problem B i submitted the same code but in different C++ version, in C++ 17 it got accepted but in C++ 20 it gave me wrong answer and because of this i had 3 wrongs submissions, can someone please tell me why this happened, like the code work in one version but in the other newer version it gives WA?
Code:
- C++ 17 (AC) : 143715633
- C++ 20 (WA) : 143715622
Any help is appreciated!

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

    Short Answer: Never trust floating-point arithmetics. Use integer arithmetic instead to get accurate results.

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

MikeMirzayanov, one hour left for the contest #768, I see you've removed the cheaters but you haven't updated the rating yet, The new rating affects the selection of the section of some contestants between div.1 or div.2