Stepavly's blog

By Stepavly, history, 4 months ago, translation, In English

Hello, Codeforces!

<almost-copy-pasted-part>

Hello! Codeforces Round #650 (Div. 3) will start at Jun/16/2020 17:35 (Moscow time). You will be offered 6 problems (one of them will have subtasks) with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating 1600 or higher, can register for the round unofficially. The round will be hosted by rules of educational rounds (extended ACM-ICPC). Thus, during the round, solutions will be judged on preliminary tests, and after the round it will be a 12-hour phase of open hacks. We tried to make strong tests — just like you will be upset if many solutions fail after the contest is over.

You will be given 6 problems and 2 hours to solve them.

Note that the penalty for the wrong submission in this round (and the following Div. 3 rounds) is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as trusted participants of the third division, you must:

  • take part in at least two rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

The problems for this round were invented by MikeMirzayanov, me and Supermagzzz and prepared by me and Supermagzzz.

Thanks to MikeMirzayanov for platforms and coordination of our work. Thanks to harlequen, manta1130, lynmisakura, Gassa, Rox, antontrygubO_o, armoking, JustasLe, iankury, Sho10, bugdone, HAEtaRhoEta for help in round preparation and testing the round.

Good luck!

Editorial

</almost-copy-pasted-part>

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

»
4 months ago, # |
  Vote: I like it +147 Vote: I do not like it

I literally started missing vovuh

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    Yes we all do :(

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it +450 Vote: I do not like it

    Hi everyone who mentioned me in this blog (I wonder that there are so many mentions!). I didn't do any rounds because of my university exams period. But now it is ended and I'm done with it. So I'll return a bit later with another Div.3 round (I need time to come up with problems, discuss and prepare them). Do not worry about me, I am fine :)

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +23 Vote: I do not like it

      and being so busy you found time to reply us all. Thats what increases our love for you.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Then i am excited to see you participate in some div3 rounds.

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I had completed solved 2 question in yesterday contest and without any wrong submission then my rank decrease by 85 points with 123 penalty.....and I had submitted a wrong solution..........anyone have clear my doubts.....

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      we are for div-3 and div-3 for you

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      More up-vote than the main one.. it's all about vovuh popularity :3 <3

  • »
    »
    4 months ago, # ^ |
      Vote: I like it -39 Vote: I do not like it

    Is it rated.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +43 Vote: I do not like it

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      yes, if your rating is less than 1600 Div 3 contest will be rated for you. but as I can see you are unrated so yes this contest will be rated for you

      • »
        »
        »
        »
        4 months ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        Hmm, then why am I not rated for this contest?

        Edit: Sorry, I didn't know that it just need to be waited.

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Rating gets change after 12 hours of hacking phase, in Div. 3

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    And I started missing Vova in the contest. Spoiler: https://codeforces.com/contest/1324/problem/E

»
4 months ago, # |
  Vote: I like it +9 Vote: I do not like it

how can I become a tester?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it -38 Vote: I do not like it

    if you mean software tester tutorial i advice you to watch edureka playlist in youtube ♥

»
4 months ago, # |
  Vote: I like it -64 Vote: I do not like it

Editorial before contest ;)

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +57 Vote: I do not like it

    this ain't codechef! ;p

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      CodeChef_admin Cache Look what world thinks about you. Thanks to the long challenge

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it +4 Vote: I do not like it

        There is a lot of cheating going on codechef long long challenge.

        Search on Telegram, there a special group ( dont remember exact name but its similar to "codechef discussion" ) dedicated to discuss the test cases and solutions.

        Also on YouTube found some guys explaining the solutions in comment boxes.

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it +24 Vote: I do not like it

          I really dont know why u try to blame codechef or codechef admin for such thing. They are just organising contest they are not saying u to cheat and u know what its people like u who cheat in the contest search for links on telegram and so so... and really dont know why people cheat just to gain good rating ... well my friend rating at any platform wont fetch u any job or such its the knowledge that can ... so just stop blaming and start studying

          • »
            »
            »
            »
            »
            »
            4 months ago, # ^ |
            Rev. 3   Vote: I like it -27 Vote: I do not like it

            Can you please write properly?

            "u" instead of "you" is irritating and also you're not texting someone that you are using "......".

            Just Stop this !

            Edit:- If disliking this comment, could change my mind? :P

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Hell yeah!! The name of telegram grp is exact same. Another reason to scrap long. I saw people there are congratulating each other and saying I got +210, i got +190 blah blah. And when i saw the shared files and photos then i realised how they acheived so. I still remeber codechef used to be good platform but now it is not so, you will barely see any (non indian) suggesting codechef. It can still regain its glory but for that they have to take some serious action and yeah plagiarism detector in long challenge is ineffective as one can easily make changes in entire code as long challenge is very supportive in such case as it give plenty of time

          • »
            »
            »
            »
            »
            »
            4 months ago, # ^ |
              Vote: I like it +52 Vote: I do not like it

            Forget about non-Indian...I barely see any Indian suggesting Codechef nowadays XD...

            • »
              »
              »
              »
              »
              »
              »
              4 months ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              Some Indians still do :/

            • »
              »
              »
              »
              »
              »
              »
              4 months ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              Exactly, we don't recommend Codechef to our college juniors. :/

              Codeforces is <3

          • »
            »
            »
            »
            »
            »
            4 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            i dont think high rating matter in any way....it might be just to show off in in between your friend and even there also you will feel disrespected when you shall not be able to ans maybe a simple question to your friend.

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        He's the codechef admin?!!!!!!!!

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          I tagged codechef admin and cache they are different person. Cache was admin of this contest

          • »
            »
            »
            »
            »
            »
            4 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Oh I'm sorry.. I didn't notice that was a separate handle..

            • »
              »
              »
              »
              »
              »
              »
              4 months ago, # ^ |
                Vote: I like it -15 Vote: I do not like it

              dont say sorry bro... things happen and you have to move on.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You are my favorite pepega.

»
4 months ago, # |
  Vote: I like it +59 Vote: I do not like it

vovuh Will always be in our memory

»
4 months ago, # |
  Vote: I like it +30 Vote: I do not like it

Consecutive div3 without vovuh :|

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck everyone!

»
4 months ago, # |
  Vote: I like it -32 Vote: I do not like it

Hope solving upto C will be enough to increase rating for newbies like me :|

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I wish all rated(<1600) users in this DIV-3 will be Unrated in the next coming div-3 rounds! :-)

»
4 months ago, # |
Rev. 2   Vote: I like it +7 Vote: I do not like it

I'm just curios, did vovuh retire?

Also almost-copy-pasted-part is a lie. :(

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I have only taken part in one rated contest, I guess this one's unrated for me.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    you are rated.. Read the line carefully >> "Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you."

»
4 months ago, # |
  Vote: I like it +210 Vote: I do not like it

»
4 months ago, # |
Rev. 5   Vote: I like it -78 Vote: I do not like it

i am feeling depressed now.....please upvote me.

»
4 months ago, # |
  Vote: I like it +20 Vote: I do not like it

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

When you are at 1562 after a pretty good previous round.

****Regardless of whether you are a trusted participant of the third division or not,if your rating is less than 1600, then the round will be rated for you.

Hell yeah! It's time to go to pupil because of alt accounts (and 4WAs on A cause I suck) I guess.

»
4 months ago, # |
Rev. 2   Vote: I like it -55 Vote: I do not like it

Always in Div.3 contest

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope it will be an interesting round !!!

»
4 months ago, # |
  Vote: I like it -33 Vote: I do not like it

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

my first div 3 contest as an expert excited

»
4 months ago, # |
Rev. 2   Vote: I like it +86 Vote: I do not like it

No offence .. It's just a meme ..

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thats mah true comrade from reddit ;)

    Upvoted !!!

»
4 months ago, # |
Rev. 2   Vote: I like it +14 Vote: I do not like it

We are missing vovuh

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Did you mean the other way around? I guess Vovuh and Stepavly should be swapped in this.

»
4 months ago, # |
  Vote: I like it -44 Vote: I do not like it

We are getting almost copy pasted blogs, one day we will get almost copy pasted problems.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +18 Vote: I do not like it

    yeah you can make your own codeforces for that

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why one day, visit interviewbit for the same today.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I think spending time on problems is of greater importance than spending time on writing beautiful or new blogs

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    This guy gotta be a genius.

»
4 months ago, # |
  Vote: I like it +7 Vote: I do not like it

RIP — vovuh, heh i will miss your contests(

»
4 months ago, # |
  Vote: I like it -6 Vote: I do not like it

Hope this round will give me positive rating change.

»
4 months ago, # |
  Vote: I like it -22 Vote: I do not like it

All Div-3 contests Div-3 Round 1 http://codeforces.com/contest/977 Div-3 Round 2 http://codeforces.com/contest/978 Div-3 Round 3 http://codeforces.com/contest/988 Div-3 Round 4 http://codeforces.com/contest/999 Div-3 Round 5 http://codeforces.com/contest/1003 Div-3 Round 6 http://codeforces.com/contest/1005 Div-3 Round 7 http://codeforces.com/contest/1006 Div-3 Round 8 http://codeforces.com/contest/1015 Div-3 Round 9 http://codeforces.com/contest/1029 Div-3 Round 10 http://codeforces.com/contest/1066 Div-3 Round 11 http://codeforces.com/contest/1077 Div-3 Round 12 http://codeforces.com/contest/1092 Div-3 Round 13 http://codeforces.com/contest/1095 Div-3 Round 14 http://codeforces.com/contest/1102 Div-3 Round 15 http://codeforces.com/contest/1108 Div-3 Round 16 http://codeforces.com/contest/1118 Div-3 Round 17 http://codeforces.com/contest/1133 Div-3 Round 18 http://codeforces.com/contest/1141 Div-3 Round 19 http://codeforces.com/contest/1144 Div-3 Round 20 http://codeforces.com/contest/1154 Div-3 Round 21 http://codeforces.com/contest/1157 Div-3 Round 22 http://codeforces.com/contest/1165 Div-3 Round 23 http://codeforces.com/contest/1176 Div-3 Round 24 http://codeforces.com/contest/1183 Div-3 Round 25 http://codeforces.com/contest/1196 Div-3 Round 26 http://codeforces.com/contest/1203 Div-3 Round 27 http://codeforces.com/contest/1213 Div-3 Round 28 http://codeforces.com/contest/1216 Div-3 Round 29 http://codeforces.com/contest/1234 Div-3 Round 30 http://codeforces.com/contest/1249 Div-3 Round 31 http://codeforces.com/contest/1256 Div-3 Round 32 http://codeforces.com/contest/1272 Div-3 Round 33 http://codeforces.com/contest/1283 Div-3 Round 34 http://codeforces.com/contest/1294 Div-3 Round 35 http://codeforces.com/contest/1296 Div-3 Round 36 http://codeforces.com/contest/1311 Div-3 Round 37 http://codeforces.com/contest/1324 Div-3 Round 38 http://codeforces.com/contest/1328 Div-3 Round 39 https://codeforces.com/contest/1335 Div-3 Round 40 https://codeforces.com/contest/1343 Div-3 Round 41 https://codeforces.com/contest/1353 Div-3 Round 42 https://codeforces.com/contest/1360

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What does a penalty of 10 minutes mean? If you have a wrong answer submission you lose ten minutes?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    The points you lose for submitting 10 min later will be the points deducted for 1 wrong submission.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    Let's take an example. Suppose you are submitting your question A after 5 minutes of contest's start time. If it is going to be correct you will be given penalty of just 5(minutes to solve question). Now suppose it is wrong on some test case.You find fault in logic and submit it after 15 minutes from the start time. So total penalty for this question would be 15(minutes to solve question) + 10(for 1 wrong submission)=25. For every wrong submission you will be awarded with 10 minutes penalty. I hope this cleared your doubt about 10 minutes penalty.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it -8 Vote: I do not like it

      You could have simply said that we get 10 minutes behind than the actual submission time.

      • »
        »
        »
        »
        4 months ago, # ^ |
        Rev. 2   Vote: I like it +3 Vote: I do not like it

        Well I tried my best to explain him 10 minutes behind the actual submission time.....

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Live upsolving 5 mins after the round ends: https://youtu.be/Fcxm3iROflI

Good luck!

»
4 months ago, # |
  Vote: I like it -25 Vote: I do not like it

  • »
    »
    4 months ago, # ^ |
      Vote: I like it -30 Vote: I do not like it

    Stfmu!

    Having a good day
    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it -16 Vote: I do not like it

      My guy almost thought he is going to get +ves for the comment ((

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it -10 Vote: I do not like it

        You see LIGHT in my profile pic..?

        YES!! I've always admired THE negative. [wicked smile]

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    not when u code in python:)

»
4 months ago, # |
  Vote: I like it +38 Vote: I do not like it

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

vovuh will you make div(1, 2) contest in the future??

most of the participants will be looking forward to the contest that you are making.

good luck to everyone who are participating in this contest!!!

and if you are interested and don't know look into it(there is an extension which predicts your score change after contest called CF-Predictor)

(Good luck & high rating!)

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    Div. 2 maybe sometimes, when I come up with good and hard enough problems. Not sure about Div. 1 :)

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    CF-Predictor disabled today.!!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I come here for the memes.

»
4 months ago, # |
  Vote: I like it +7 Vote: I do not like it

You have 6 Hrs 30 Min to provide fastest editorial. :)

»
4 months ago, # |
  Vote: I like it +28 Vote: I do not like it

»
4 months ago, # |
  Vote: I like it +30 Vote: I do not like it

I thought vovuh was a university student... Though youth doesn't prevent him from being strong and orzable.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    Actually, I am stupid and "high school" was a semantic typo because I don't remember what is high school exactly and of course because I am stupid. Sorry :(

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    What does orzable have to do with it?

»
4 months ago, # |
Rev. 2   Vote: I like it -59 Vote: I do not like it

Is it rated?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

waiting for this contest <3

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck to y'all.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good Luck!

»
4 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Worst Problem Today: CF Predictor is disabled.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I've updated the extension, you probably didn't accept new permission. Please let me know if you have latest version of the extension (1.3.0) it's enabled and still doesn't work.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

"do not have a point of 1900 or higher in the rating." 1900 or1600?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +22 Vote: I do not like it

    lets say at some point in time you've been 2000. then you do a huge drop and go to 1200. in this situation your current rating is under 1600, but you have a point in which your rating has been above 1900 and because of that div3 will not be rated for you. hope that helped

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hope to solve a b c or a b c d

»
4 months ago, # |
  Vote: I like it -6 Vote: I do not like it

Looks like most unbalanced Div 3 ever. Solve first 3 and then netflix and chill.

»
4 months ago, # |
Rev. 3   Vote: I like it -7 Vote: I do not like it

stringforces!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Now that's a damn great contest. My best ever. Thank you Stepavly!

»
4 months ago, # |
  Vote: I like it -50 Vote: I do not like it

Worst contest of all time.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it -21 Vote: I do not like it

    same to me..a b solved with 8 min..but c killed me..i solved at last with 6 WA.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

notDiv3 Forces

»
4 months ago, # |
  Vote: I like it +24 Vote: I do not like it

Comments summarized -
Make Div.3 great again.
Bring vovuh back.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +21 Vote: I do not like it

    Today's contest was great. wasn't it?

    • »
      »
      »
      4 months ago, # ^ |
      Rev. 3   Vote: I like it +18 Vote: I do not like it

      yes but I think problems are more suitable for DIV-2.

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it +7 Vote: I do not like it

        Yeah, i agree that problems were tougher than usual Div3's.

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Could you anyone explain answer 15-beautiful to the task E?

20 10
aaebdbabdbbddaadaadc

Counts:

[a,b,c,d,e]
[7,5,1,6,1]
»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

As usual xD.D always alot harder than C

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it
»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve F1 !?

»
4 months ago, # |
Rev. 2   Vote: I like it +15 Vote: I do not like it

C to D long difference -_-

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Hey, how to upload a meme?

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +5 Vote: I do not like it
      1. upload image on imgflip.com
      2. you can add some text on the picture.
      3. copy the link and paste in the comment picture option.
      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        i think you should focus more on coding than memes

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

corner cases in C sucked the crap outta me

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

How to solve C? This one was hard for me

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    man are you nude in pic ?? !! hell !!

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    3 parts, the 0s before first 1, the 0s between any two 1s in middle, and the 0s after the last 1.

    For the first, the answer would be + no of zeroes / k + 1. You can consider it like you need to enter k zeroes and a 1, so the total sequence you insert is k + 1 length. Similarly from the last 1. For the middle part, you need to insert k zeros, a 1, and again k zeroes at the end( only once). so answer for middle would be (no of zeroes — k) / k + 1.

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it
    1. between two 1 >> count number of zero ..count-=k and ans+=count/(k+1);
    2. and for first until found 1>> count number of zero ..and ans+=count/(k+1);
    3. and for last_1 to last>> count number of zero ..and ans+=count/(k+1);
    4. But if all zero then ans=(n+k)/(k+1);

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Got it, I will try to answer it. Thank you very much

»
4 months ago, # |
  Vote: I like it +2 Vote: I do not like it
»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I submitted the solution for E here: https://codeforces.com/contest/1367/submission/84020235 It gives the correct output locally, as well as on codechef's online IDE. What's going on? Can anyone help?

»
4 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Can someone explain their approach to F? I was thinking that the answer is something along the lines of $$$n - LIS(a)$$$ but I couldn't prove it

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    At first sight, I also thought the same. But the last test case lol !

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    Yes we have to find the LIS but it should also be the subarray of sorted version of that array.

  • »
    »
    4 months ago, # ^ |
    Rev. 3   Vote: I like it +3 Vote: I do not like it

    There is one more condition that LIS should be consecutive in given sorted array.

»
4 months ago, # |
  Vote: I like it +44 Vote: I do not like it

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Am I the only one who was facing difficulties in implementing D?

I should have tried E first.

Looking forward for short ways to implement D.

PS. Solved D,5 mins before the contest ends. Fingers crossed for system tests.

»
4 months ago, # |
Rev. 2   Vote: I like it +7 Vote: I do not like it

Problem F1 is a variation of this problem: https://codeforces.com/contest/1231/problem/E

»
4 months ago, # |
  Vote: I like it +4 Vote: I do not like it

The problems were nice!

But the Huge difficulty gap between Problem C and D made the contest "FastTypeForces" !

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can Anybody tell that is there any corner case in Problem C? Getting WA on test 2. Solution — 84019963

  • »
    »
    4 months ago, # ^ |
    Rev. 4   Vote: I like it 0 Vote: I do not like it

    Brother your solution is failing on some test cases... One example
    n=5 k=1
    string= 10100
    Your output= 0
    Answer should be= 1 (10101)
    Please check your code accordingly.......

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      Thanks Brother for replying,

      I think Answer should be 1. Why are you counting the '1' which is already given? we have to find additional tables that we can occupy.

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Friend now i have updated my comment...Sorry for last wrong comment... This time I think i have found test case giving wrong answer to your solution

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Thank you Friend, I got my mistake!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Dont konw why get WA on 3 in problem D until the end of the contest. Interesting maybe I implement something stupidly wrong.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Tough div3 round!!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

For problem D , can someone help me ?

https://codeforces.com/contest/1367/submission/84022026

My code is giving correct o/p if i use number of test cases as 1. but for multiple test cases its giving wrong output in some weird format, any help will be appreciated !

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I found the answer for F1 as n — (longest sorted subsequence length). Why doesnt the same logic work for F2? My logic was basically keeping the already sorted things at their place and moving other numbers to sort them.

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    1

    4

    2 0 0 3

    Longest sorted subsequence is 0 0 3, but you cannot move 2 to the middle in one move.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      By longest sorted subsequence i did not mean Longest increasing subsequence. Sorry for the confusion. What i meant was if we sort the given sequence lets say

      S = 2 0 0 3

      and the sorted sequence becomes

      S' = 0 0 2 3

      I am calling the longest sorted subsequence as the largest subsequence in S which is a substring of S'. So for your example it will be 0 0 and the answer comes to be 2. Again, sorry for the confusion of terminology.

      • »
        »
        »
        »
        4 months ago, # ^ |
        Rev. 4   Vote: I like it +3 Vote: I do not like it

        it will work, your way of finding the lis which occurs as sorted subarray is wrong. let's compress the array so that it contains elements from 1 to n. The problem is when an element(let's say $$$x$$$ and $$$x$$$ -1 is already taken in LIS) has multiple occurences than we need to ensure that if we take $$$x$$$ + 1 then all the occurrences of $$$x$$$ are already taken in LIS. This is the thing you are missing (i too missed this).

      • »
        »
        »
        »
        4 months ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        How does one come up with such observation? Its like, I thought of LIS but after seeing the last sample test case I thought may be this observation of mine is farfetched. Do I need to solve similar questions before I get any close to acing div2 and div3?

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          https://codeforces.com/problemset/problem/1363/F

          i couldnt understand the question to the link i gave you, before. Its editorial had similar wording. So while i was trying F i thought of the operation as cyclic shifts and modeled it similar to this question. I remembered in the actual editorial (there was an editorial of this question which i cannot find link to, this question was copied from there). In the actual editorial they talk about if both types of shifts were allowed. So i modeled on that solution. I think in the end it is how many questions you have solved and how much did you learn from them. Keep solving and you will get these questions soon :)

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    if i take the elements in pairs as{ element value,index} and then sort the array based on its element value and then find the largest increasing subsequence for the index part,will it work?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

StringForcessss

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

bring back vovuh

»
4 months ago, # |
  Vote: I like it -9 Vote: I do not like it

Nice round! Was 1 min too late to get D.

»
4 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

In my opinion too hard problems for div 3 and I felt like it was div 2 with more problems than usual

»
4 months ago, # |
  Vote: I like it +3 Vote: I do not like it

D is for div2

»
4 months ago, # |
  Vote: I like it +9 Vote: I do not like it

Problem F is very similar https://atcoder.jp/contests/agc024/tasks/agc024_b?lang=en , but I can't solve F2 ( ;∀;)

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How can i solve D and E? I solved A,B,C fast but I can't get an idea how to solve these two

  • »
    »
    4 months ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    Problem D

    • Let $$$X$$$ be the number of position $$$i$$$ such that $$$B_i$$$ is $$$0$$$ and $$$t_i$$$ is still undetermined.
    • Choose the biggest character $$$c$$$ such that it is unused, smaller than any already used character and it appears at least $$$X$$$ times in $$$s$$$. Assign $$$c$$$ to all of those $$$X$$$ positions described in the previous step.
    • For all the position $$$j$$$ where $$$B_j$$$ is non-zero, subtract $$$|i-j|$$$ from $$$B_j$$$ for each position $$$i$$$ of those $$$X$$$ positions we got in the first step.
    • Repeat these steps until all the characters of $$$t$$$ are determined.
»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Codeforces should add a new feature for rating a round. from C to D hardness jumped like anything and this isn't good for us. at the last it was just a typing round. maybe testing could have been better.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Here's how I solved D:

We have our array b. We start filling our final string at those positions where b[i]=0 {because we can fill all these positions with greatest alphabet having relevant count}. This means, first iterate over string and calculate count of each character in our original string s. Now, at each iteration, we fill all indices at which b[i]=0 with the character that is lexicographically greatest, and has a count greater than or equal to no. of indices having b[i]=0. Dont forget that with increasing iterations, the character in the final string that you fill in at all 'i's such that b[i]=0; should decrease lexicographically.

Also at each iteration, for each index value where b[i]=0; update the values in array b for every j (b[j]!=0) by b[j]= b[j]-abs(j-index[i]) {where lets say index array contains all positions in b where b[i]=0}. This is done to ensure that the contribution of positions we've already filled, is not taken further into account while filling the final string in further iterations.

Do these iterations uptil the level, all positions in the final string are assigned some character.

You can visit my profile and see my code. Its pretty understandable.

Btw It was a beautiful contest. I couldn't have time to solve E although it seemed doable to me.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Was E today easier than usual div3 Es?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    slightly but it is ok it was more because D was hard

»
4 months ago, # |
  Vote: I like it +2 Vote: I do not like it

why there are hacks on D?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
4 months ago, # |
  Vote: I like it -9 Vote: I do not like it

LOL F1 was much easier than D,E

»
4 months ago, # |
  Vote: I like it +86 Vote: I do not like it

Ashishgup is back!!

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Edit: Found a simpler method.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I got this diagnostics from my submission 84025940 for 1367D - Task On The Board. Does anyone know what this means?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The error is in reference with the cf evalutor, read the check log you will get it. Yours code is generating warnings but no compilation or runtime error. The ans it is printing is causing the error in the evaluator

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

F1 is very similar to this problem from SPOJ which I already solved. I didn't read F1 during the contest (thinking it would be very difficult) and now I submitted the same code just with one change and got accepted :-( and F1 is more easier than D and E

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

What's the meaning of giving such useless pretests? Isn't it better to run the whole dataset after the contest and no testcase run during the contest? If pretests of problem D didn't give the AC verdict,I would make some cases and run them for my code. The case missing in the pretest set is like:

1 aaabbc 4 3 2 1 0

Simple and necessary case.

What's the meaning of pretests? mocking?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Exactly my question. If you don't even care enough to give some critical in pretests what's the use of even giving some of those?

    Many setters even exclude all the critical cases intentionally to make every contestant suffer after the contest ends. I don't actually get the actual reason behind this. Contestants love a contest with some strong pretests, not your silly evil game.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      You should work on testing your own code. TopCoder for example gives very simple pretests. If pretests catch everything, then hacks will be impossible.

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Yeah, I guess. The best thing we can do from our side to write the cleanest as possible code possible, I guess.

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    mian hehe

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      I have hacked my own submission with this case. I will be pleased to know how the case is invalid.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      You might have given 1 aaabbc 4 3 2 1 0 in the hack. The correct format is
      1
      aaabbc
      4
      3 2 1 0

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The first example case tests the same thing and your code somehow gets marked as OK despite an invalid answer. I don't think the pretests are weak, I think the checker is broken.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      No, I was not taking care of the frequency. Say, I want to put a character in the indexes where b[I] = 0. Let, I have chosen character 'x' and I don't have enough characters to put in the indexes where b[i] = 0. My code was not handling that and got AC. It's not fair at all.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it -78 Vote: I do not like it

    MikeMirzayanov Stepavly Supermagzzz What the FUCK man. You FUCKING FUCK.

»
4 months ago, # |
Rev. 2   Vote: I like it +24 Vote: I do not like it

MikeMirzayanov Stepavly i wonder how did this pass ? the complexity is O(n*n*n) 84019953

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    The sum of n for all test cases in one test does not exceed 3000.

    I THINK its ok with the constraints.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      3000^3 should be TLE :/

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I think it is $$$\frac{3000^3}{8}$$$, which is aprox 3e9 and slightly fits into 2000ms.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Your algorithm has a good constant factor and TL is quite big.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it's just O(n*n)

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    Maybe it's due to compiler optimization...

    The algorithm is exactly $$$O(n^3)$$$ but the compiler greatly optimized it...

    In fact, that program need to run about $$$4.5*10^9$$$ operations in the worst case (when $$$a_i$$$ is strictly increasing), which should take over $$$20$$$ seconds without optimization :(

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +14 Vote: I do not like it

      Yes I know that my program need to run 4.5e9 in the worst case .. and i tried to hack it but i couldn't .. so i think that is unfair :/

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can any one Explain E problem?

`Thanks in advance`
»
4 months ago, # |
  Vote: I like it +17 Vote: I do not like it

For people who prefer video editorials, I discuss the solutions to all problems at the end of my screencast of the round.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope "accepted" and "pretest passed" will not follow the rule of social distancing

but vovuh should not keep social distancing from Div3

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

83942386 why is it giving MLE for the first question ????

»
4 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Is there some problem with the checker for Problem D ?
For the case-
aabc
3
2 1 0
Many submissions give "bbc" as output and checker give them Ok response

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It was my second contest and again I could only solve a single problem, for the second problem I could only solve the visible test case, and couldn't think of the hidden test case, one of the major pain points, not being able to be creative enough to be able to think through the test case, feels like not having the brains or observational skills, any advice to how can I work to improve on this??

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Only things which can make you better is

    1st Spoiler

    And

    Spoiler 2
»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why am i getting this error in trying to hack a solution ? Validator 'validator.exe' returns exit code 3 [FAIL initial string should satisfy distance condition (test case 1) can anyone help ?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I guess you are talking about problem C.
    From error it seems that that you are entering string that itself is not satisfying the condition of minimum distance. Eg. For n=5 and k=1 you cannot enter input string as 10011

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why not my dashboard is not showing i have participated in this contest and even not any changes in rating

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is the round rated yet?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same with me. There are no changes in the ratings. It might be a bug or any other issue as codeforces was down for some time. Let's see what happens.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Of course . Just need to wait.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Have all the submission's been re-judged after the hacking phase? it doesn't look like it.

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

My solutions are in queue since 30 minutes!

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    maybe server is down,once my solutions were in queue for 4 hours..

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hey all, I am a newbie and I saw many blogs about problem D of yesterday's contest . So I want to know that whether this contest is rated for me or not . I am able to solve only problem A and B

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Rated for you.rating change doesn't not related with newbie or you saw problem D in many blog..rated for all are rating less than 1600.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey i gave this contest and my rating is not updated yet I am new to codeforces how much time it takes to update rating??

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    The system testing is not complete yet, ones it is completed rating will get updated in 2-3 hours.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      its complete ig coz the rankings arent changing anymore

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        It is not even started, only the hacking phase is completed.

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it +1 Vote: I do not like it

          Yeah right

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          I was practicing on some old questions. The solution took some 30 mins to get judged and before that codeforces site was not working so I thought it was system testing for which they stopped everything

»
4 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

solved E without graphs.. gcd and some basic operations : solution

»
4 months ago, # |
  Vote: I like it -28 Vote: I do not like it

Please help The judge and my local systems produce different answers even for given sample input output. The output on my system is identical to the required output but on running the judge i get the output as 3 for all the input test cases in the sample given

include<bits/stdc++.h>

include

using namespace std;

int v[1000000];

int main() { int t; cin >> t;

while(t--)
{
    int n, k;
    cin >> n >> k;

    //Taking input
    fflush(stdin);
    for(int i  = 1; i <= n; i++)
    {
        int x = getc(stdin);
        x = x - '0';
        v[i] = x;
    }

    //Checking for any 1 in range 1..k
    int pos = 1;
    int ans = 0;
    bool flag = false;

    for(int i  = 1; i <= k; i++)
    {
        if(v[i] == 1)
        {
            flag = true;
            pos = i;
            break;
        }
    }
    if(!flag)
    {
        ans++;
    }

    pos += k + 1;

    while(pos  <= n)
    {
        //If one is present k positions away
        bool isPresent = false;
        for(int i  = pos; i <= pos + k; i++)
        {
            //If we reach end of list
            if(i > n)
            {
                pos = n + 1;
                isPresent = false;
                break;
            }

            if(v[i] == 1)
            {
                isPresent = true;
                pos = i + k + 1;
                break;
            }
        }

        //If one is absent k positions away
        if(!isPresent)
        {
            ans++;
            v[pos] = 1;
            pos += k + 1;
        }
    }
    cout << ans << endl;

}

}

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why has the rating not updated yet?

»
4 months ago, # |
  Vote: I like it +85 Vote: I do not like it

In problem D, there was an issue in the checker program, which affected some participants. I am now investigating this incident. I'll exclude from the rating all those who were affected by this mistake. During the research, I will temporarily hide the problem from the contest, then it will return. I believe that the problem affected no more than a few percents of all participants in the round. I apologize: I was one of three people who read the checker but did not notice a typo in it.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +13 Vote: I do not like it

    But pls make sure those who have submitted correct , they should be rated with problem D,because i see a sudden drop in my standing

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      Yes, the people who submitted it right must be given points for it and the system testing should be done again.

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      Same thinking with you :(

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      What's actually a hacking phase in codeforces? I'm new at it and I've seen people talking about hacking a problem or solution (don't know exactly what it is). Can someone explain about it little bit?

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        After the contest is over, your solution can be viewed by anyone. You can then run the solution on your custom testcases known as hacks. if the solution fails, then the hack is succesful.