DimmyT's blog

By DimmyT, 6 years ago, translation, In English

As-salamu alaykum, Codeforces! (Peace, Codeforces!)

We are glad to invite you to Codeforces Round 673 (Div. 1) and Codeforces Round 673 (Div. 2), which will take place at Sep/27/2020 18:05 (Moscow time) (notice later time than usual). The round is rated for both divisions. Each division will be given 6 problems to solve in 2 hours.

Problems were prepared by nkamzabek, bthero and me DimmyT.

We are very grateful and would like to sincerely thank the following people for their assistance in preparing the round:

This is our first round, we hope that the problems will be interesting and that the round will pass without issues.

Score distribution:

Div2: 500-1000-1500-2000-2500-3000

Div1: 500-1000-1250-2000-2250-2750

Wish everyone good luck and high rating!!!

UPD: problem ideas

UPD: Editorial Out

Congratulations to everyone, contest passed without issues!!!

Div1:

  1. tourist

  2. ksun48

  3. maroonrk

  4. 300iq

  5. Aidos

Div2:

  1. poorboy

  2. kaisel

  3. immortalhunt

  4. hieudxm

  5. _dg_

  • Vote: I like it
  • +724
  • Vote: I do not like it

| Write comment?
»
6 years ago, hide # |
 
Vote: I like it +49 Vote: I do not like it

Hope that your first round as a setter will be flawless.Good luck DimmyT.

»
6 years ago, hide # |
Rev. 2  
Vote: I like it +241 Vote: I do not like it

As a setter, give me a contribution please)

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How was this blog made 7 weeks ago?

»
6 years ago, hide # |
 
Vote: I like it +46 Vote: I do not like it

DimmyT Will I reach you? I hope I can reach you...

Reference: See my profile picture and the problem setter's. Also, I do want to reach Master. :3

»
6 years ago, hide # |
Rev. 2  
Vote: I like it +3 Vote: I do not like it

clash with CodeAgon 2020 (Codenation coding challenge) https://www.interviewbit.com/contest/codeagon-2020/

just saying :)

»
6 years ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

Good luck to everyone and thanks the authors for the contest!

»
6 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

DimmyT Please BOLD or HIGHLIGHT the unusual contest time .

»
6 years ago, hide # |
 
Vote: I like it +36 Vote: I do not like it

Wa alaykumu as-salam

»
6 years ago, hide # |
 
Vote: I like it +29 Vote: I do not like it

Wa alaykumu s-salam DimmyT

»
6 years ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

Oalaikumus salam

»
6 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

lovely to see salam... Walaikumussalam

»
6 years ago, hide # |
Rev. 2  
Vote: I like it +5 Vote: I do not like it

Oya-laikumus salam DimmyT,, hope the Div-2 round will be very interesting ❤

»
6 years ago, hide # |
 
Vote: I like it +54 Vote: I do not like it
Fun fact
Another fun fact
Conclusion
»
6 years ago, hide # |
 
Vote: I like it -28 Vote: I do not like it

Wa alaikum us salam. [user:DimmyT]Very very good wishes for your first round.

»
6 years ago, hide # |
 
Vote: I like it -60 Vote: I do not like it

Good to see a round from the Borat country_****_

»
6 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

Why have you tagged this round as cf666 ?

»
6 years ago, hide # |
 
Vote: I like it -13 Vote: I do not like it

A best of luck to all from this baby panda :)

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

what is the division rule in parallel div1/div2 round, because i am seeing that some experts are registered in div1 and some master are also registered in div2 too so am i little bit confused can anyone explain

»
6 years ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

Hope that I will become specialist after this round.

»
6 years ago, hide # |
 
Vote: I like it -41 Vote: I do not like it
Spoiler
»
6 years ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

this contest time is very good for me.

»
6 years ago, hide # |
Rev. 2  
Vote: I like it -7 Vote: I do not like it

Walaikum-assalam...waiting for your first and hopefully nice round.and also hope i will reach my top rating ...

»
6 years ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

waiting for score distribution

»
6 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Wa alaykumu s-salam!

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Good luck to everyone!

»
6 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Will score distribution publish after the contest?????

»
6 years ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

Hope for a better Rating for me and everybody :) keep practicing!

»
6 years ago, hide # |
Rev. 2  
Vote: I like it +1 Vote: I do not like it

Less than 90 minutes until the round starts.. no score distribution yet?

UPD 1: Less than 60 minutes, no score distribution yet

»
6 years ago, hide # |
 
Vote: I like it +23 Vote: I do not like it

As a contestant, I would like a cake.

»
6 years ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

thanks again to MikeMirzayanov to for creating, developing, and maintaining the best websise of algorithmic problem ever. and my congratulation to you, DimmyT, for managing a team to creating contest and I hope that will be one of your best experience.

thanks again for your efforts.

»
6 years ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

DimmyT how many shared problems will be?

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

"UPD: problem ideas"

got trolled by this in the update.

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Original Song is so inspiring!!!

»
6 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

This is my first time I solved a div2 probelem during a contest. Yeah!!!!!

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hello all ,can someone explain me , why my rank dropped ,the moment i submit the same code for the same problem after sometime tho it was already passing the pretests successfully?

»
6 years ago, hide # |
 
Vote: I like it -48 Vote: I do not like it

I'm really disappointed I took my time thinking in C but couldn't see the solution :/

  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    What do you mean by "see", do you mean "without getting the solution"?

  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it -32 Vote: I do not like it

    What was the point to write it in the comments? You wanted to show everybody how stupid you are? Well, mission accomplished dumb ass

    • »
      »
      »
      6 years ago, hide # ^ |
       
      Vote: I like it -43 Vote: I do not like it

      if someone couldn't figure out the solution of some problem that doesn't mean he's stupid most of the times I can solve C
      what's the point of your comment? to show me that you're a piece of shit ? Well, mission accomplished dumb ass

      • »
        »
        »
        »
        6 years ago, hide # ^ |
         
        Vote: I like it -28 Vote: I do not like it

        Bruh, why do you still green-piece-of-shit if you've already participated in 200 rated rounds

        • »
          »
          »
          »
          »
          6 years ago, hide # ^ |
           
          Vote: I like it -30 Vote: I do not like it

          I'll come back to cyan soon don't worry no wonder why your contribution is -7 because you're a jerk

          • »
            »
            »
            »
            »
            »
            6 years ago, hide # ^ |
             
            Vote: I like it -22 Vote: I do not like it

            at least, I participated in less than 150 rounds, and I have higher rating than you, and I don't cry because of unsolved problem

            • »
              »
              »
              »
              »
              »
              »
              6 years ago, hide # ^ |
               
              Vote: I like it -32 Vote: I do not like it

              there are others higher than you so what's the point ? does that give you permission to talk down to others should tourist come and write to you orange-piece-of-shit and I'm not crying it's just a comment that expresses what I feel WTH do you want from me

              • »
                »
                »
                »
                »
                »
                »
                »
                6 years ago, hide # ^ |
                 
                Vote: I like it -10 Vote: I do not like it

                OK, I think guys, that have higher rating then I and had participated in less rounds than I are really cool. I want you to delete all your useless comments, because people here don't give a fuck about how you were thinking in div2 C and didn't solve it. You have just to work hard and don't write this shit in comments.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 years ago, hide # ^ |
                   
                  Vote: I like it -13 Vote: I do not like it

                  I don't think I should take advice on what I should I write from -7 contribution asshole make your contribution more that 100 then speak

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 years ago, hide # ^ |
                   
                  Vote: I like it -15 Vote: I do not like it

                  Oh yeah, if u think that contribution shows the level of your IQ, than u r really stupid

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 years ago, hide # ^ |
                   
                  Vote: I like it +14 Vote: I do not like it

                  Can you complete a sentence without saying bad words?

                  There are many of codeforces users who have not yet completed the age of 13 and you are affecting them with your speech.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 years ago, hide # ^ |
                  Rev. 2  
                  Vote: I like it 0 Vote: I do not like it

                  well it shows how good your comments are and your comments sucks
                  so you think tourist is cool well you're right he is cool but does he talk like you ? No he never told someone you're bad because he isn't a piece of shit like you

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 years ago, hide # ^ |
                  Rev. 2  
                  Vote: I like it +6 Vote: I do not like it

                  jaded how old are you lmao.

                  8?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 years ago, hide # ^ |
                   
                  Vote: I like it -8 Vote: I do not like it

                  OK

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  6 years ago, hide # ^ |
                   
                  Vote: I like it 0 Vote: I do not like it

                  Sure

          • »
            »
            »
            »
            »
            »
            6 years ago, hide # ^ |
             
            Vote: I like it +14 Vote: I do not like it

            And I really don't give a fuck about my contribution:)

          • »
            »
            »
            »
            »
            »
            6 years ago, hide # ^ |
             
            Vote: I like it +27 Vote: I do not like it

            In Ukraine we say:"Не кажи гоп, поки не перестрибнеш", and i think it's beautiful.

            • »
              »
              »
              »
              »
              »
              »
              6 years ago, hide # ^ |
               
              Vote: I like it +22 Vote: I do not like it

              In Ukraine "Kyivstar" bans Codeforces, and i think it's beautiful.

      • »
        »
        »
        »
        6 years ago, hide # ^ |
         
        Vote: I like it +23 Vote: I do not like it

        If you can't solve problem, it is your fail. Your comment was stupid and useless. You have better go and upgrade your skill.

      • »
        »
        »
        »
        6 years ago, hide # ^ |
         
        Vote: I like it +19 Vote: I do not like it

        Really guy, why do you write this comment? What are you waiting for? You simply write shit into comments, and because of you and guys like you comments section have a lot of useless shit instead of really important comments.

»
6 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

nice score, awesome D...

»
6 years ago, hide # |
 
Vote: I like it +72 Vote: I do not like it

That was stressful, wow.

In Div1C, was it intended to disallow $$$O(n \log n \log C)$$$ solutions? If so, it would've been better to make it explicit with setting $$$n = 10^6$$$ or something.

»
6 years ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

why is my contribution -1? what did I do?

  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it +16 Vote: I do not like it

    You posted this comment without formatting code and without hiding code in a spoiler tag.

    • »
      »
      »
      6 years ago, hide # ^ |
       
      Vote: I like it +5 Vote: I do not like it

      Okay. I didn't know that. I am new. How can I now make my contribution non-negative?

      • »
        »
        »
        »
        6 years ago, hide # ^ |
         
        Vote: I like it +18 Vote: I do not like it

        My suggestion (this goes out to everyone who has negative contribution and doesn't understand why): lurk the blogs and comments here to get a feeling about which comments and blogs are welcome. And only once you understand, start commenting yourself.

»
6 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

WA 6 times.

Div2D pretest 2 is literally mocking at me.

»
6 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

And the fastest editorial publisher award goes to DimmyT

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can someone please explain the wrong strategy in my d2c ans : Store the indices for each value and then find the minimum value of k for which this fits by binary search. and then manipulate the answer array with left to right traversal.

Regarding binary search I got a pattern that for each indices in kth supposed iteration its supposed count is min(i, k, n — i + 1, n — k + 1) then I binary search on the value of k.

»
6 years ago, hide # |
 
Vote: I like it +81 Vote: I do not like it

submit F in last 5 seconds and find my output is following:

YES
1 1 1 1
1 1 1 3
4 2 3 1
RDLL
DRDD
ULUU
NO

instead of

YES
1 1 1 1
1 1 1 3
4 2 3 1
R D L L
D R D D
U L U U
NO

Hope my solution is wrong XD

»
6 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Cornercase for Div2D: it is possible that we can't subtract anything from such ai that ai<i and this ai is more than sum(a)/n, but we can add to it i-(ai%i) from a0, so solution exists in that case

  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    Also, I've been struck for a long time thinking what if i-(ai%i) > a1. But since at any point say we are at index i, a1 must contain atleast i-1 (as initially all elements >=1). And i-(ai%i) cannot be greater than i-1(since i doesn't divide ai). Hence, the non-negative condition holds. Nice problem.

»
6 years ago, hide # |
 
Vote: I like it +21 Vote: I do not like it

Div1B : The initial value of a_i IS NOT 0

haha....

»
6 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

got OK on D with 1466 ms with sets in $$$O(nlog^2n)$$$

how to solve it properly?

UPD: resubmit of the same code in upsolving results to 1231 ms. got "lucky".

»
6 years ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it

Tonight may be the second time I turn blue. My performance tonight is not good. After finishing the first three questions, I looked at D and didn't have any thoughts, and then I looked at E and I didn't even think. Finally, I came up with an algorithm for the number of operations for question D of 2*n, and submitted it at 01:52. But returning to the wrong answer, I reviewed the code and found a bug, but there is no time to change it. If you give me half an hour more, maybe I can pass it. I also want to be a candidate master, but I know this is not realistic. The realistic goal is to stay blue for the next few rounds. It's incomparable to a god who can turn yellow or red in a few games, and I am satisfied with that. I don’t have any acm and oi experience. I’ve been in contact with codeforces for four months. I can’t even solve div2a from the beginning (yes, I tried div2a for one round, but after trying for more than an hour, I still didn’t get ac. There was no way, I had to look at other people's code, and finally passed this question.), This is my first experience of doing the question in codeforces. By now, I finally solved some problems. Having said that, I hope everyone has good luck and a good rating, and most importantly, make progress on codeforces.

  • »
    »
    6 years ago, hide # ^ |
    Rev. 2  
    Vote: I like it +9 Vote: I do not like it

    You can do it!!! Before I finally became a Candidate, I almost fell to Specialist.

    • »
      »
      »
      6 years ago, hide # ^ |
      Rev. 2  
      Vote: I like it 0 Vote: I do not like it

      What is wrong in the solution of D. (Div 2)

      Code

      UPD: Found my bug. Thank You all.

    • »
      »
      »
      6 years ago, hide # ^ |
       
      Vote: I like it +1 Vote: I do not like it

      I must say the problems were very good!

    • »
      »
      »
      6 years ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      This contest is great, thank you for your encouragement.

»
6 years ago, hide # |
Rev. 3  
Vote: I like it 0 Vote: I do not like it

please help why my logic of two sum is not working for problem B My Code

  • »
    »
    6 years ago, hide # ^ |
    Rev. 4  
    Vote: I like it +4 Vote: I do not like it

    I tried your code with the following input and got the wrong output. In the result, the two groups would be "1 4" and "1 4", and clearly there is a pair that adds up to 5 in each group. The correct partition should be "1 1" and "4 4"

    Input:
    1
    4 5
    1 4 4 1
    Output:
    1 0 1 0
    

    You would want to be consistent in the partition of numbers — by which I mean if one 4 is given to group A for one time, you'll also want it to be given to group A when it appear for the second time. The way I did it is to:

    for(ll i=0; i<n; ++i) {
                if (umap[k-nums[i]]>0) {
                    c.push_back (i);
                    //delete this line: umap[k-nums[i]]--;
                } else {
                    umap[nums[i]]++;
                }
    }
    

    and treat "number = half of the unlucky number" as special cases.

    • »
      »
      »
      6 years ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Hi, why we need to place in same group.. can you please explain me why we need to be consistent in partitioning.

      • »
        »
        »
        »
        6 years ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        If you have "3 5 5 3 3 5" and the unlucky number is 8, and if you put 3 into group A the first time and into group B the second and the third, it would be like:

        Group A: 3 5 5
        Group B: 5 3 3
        

        But in this case both of the group contain two pairs of 3-and-5, which adds up to 8.

        A better solution is to partition this into:

        Group A: 3 3 3
        Group B: 5 5 5
        

        In this case no 3 and 5 are in one group.

»
6 years ago, hide # |
Rev. 2  
Vote: I like it -10 Vote: I do not like it

****i think you should make strong pretests..**** btw good questions great-

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

can someone help me find why it FST in div2b[submission:93982376] thanks

  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    One of the problems I see is you seemingly have uninitialized c when k%2 == 1

  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    On line 39:

    38   rep(i,0,n){
    39   	if(a[i]>=k){
    40           cout<<0<<" ";
    

    if you put "if(a[i]>=k)" instead of "if(a[i]>k)",then both all numbers bigger than k and k s themselves are automatically labelled 0.

    However, the numbers could also contain 0, and thus 0 and k are both labelled 0, according to your codes.

    Best luck next time, Kanshan.

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

What about div-2 B

can some one give me some idea for that

Thanks in advance

  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    Try to partition the numbers into two sets in such a way that for a number $$$x$$$, $$$x$$$ and $$$T - x$$$ won't belong to the same set

    If both sets contain $$$T - x$$$ go to the set with the minimum count of $$$T - x$$$.

    Submission: Link

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How long will rating be updated after the game?

»
6 years ago, hide # |
 
Vote: I like it +26 Vote: I do not like it

Congrats Ashishgup

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thank you DimmyT, this contest helped me to get Specialist