Ashishgup's blog

By Ashishgup, 5 years ago, In English

Hi everyone!

I would like to invite you to another one of our rounds, that I set with my friends FastestFinger, smartnj, the_hyp0cr1t3 and ridbit10.

The round Codeforces Round 651 (Div. 2) will take place on Jun/20/2020 17:35 (Moscow time). If your rating is less than 2100, this round will be rated for you; otherwise, you can participate out of competition.

I would really like to thank my co-setters and:

Based on past reviews, we have:

  • Tried to make A easier and make the difficulty gradient a bit better
  • Reduced the number of AdHoc problems and made the problemset more diverse

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

Good luck! :D

The scoring distribution will be: $$$500 - 1000 - 1500 - 2000 - 2500 - (2000 + 1250)$$$

Upd: Quick editorial — Hope you guys found the problems interesting :D

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

| Write comment?
»
5 years ago, # |
  Vote: I like it +135 Vote: I do not like it

Be ready for an interesting round :).

  • »
    »
    5 years ago, # ^ |
      Vote: I like it -49 Vote: I do not like it

    All questions on maths and num theory. Questions not spread on different topics. Not an interesting round, sadly.

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

      Only first two problems were math, but not the rest, i was also annoyed to see two consecutive GCD related problems.

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

        I won't call even A and B math. Yes they use a math concept (which every problem on CF does lol).

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

      Only A and B it`s math and num theory.I would even say that A is more about logic. B — the simplest math at the elementary school level. even + even = even, odd + odd = even, even + odd = odd. C — a little connected with math, but you can exit by simple programming, solving the problem in sqrt(N)*log(N). D, E and F — not math. In addition, 95% of codeforces problems are somehow related to math

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

      But the problems were good

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

    Now we are waiting for your round to be interested. :D

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

Ashishgupforces, niceforces, hopefullynogreedyforces

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it -29 Vote: I do not like it

    !(MATHFORCES)

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

      No, you wrong. A — logic and a some math. B — elementary school math: even+even ==even, odd+odd=even even + odd = odd. C — you can solve this task without math — only programming(for example complexity sqrt(N)*log(N)). D — binary search or DP. E and F1 F2 — no math

»
5 years ago, # |
Rev. 2   Vote: I like it -41 Vote: I do not like it

Hoping to haffun :p

»
5 years ago, # |
Rev. 3   Vote: I like it -33 Vote: I do not like it

Ashishgup problem-set are so much interesting every-time. Hope we enjoy and learn so much from this one too .

UPD: A,B both gcd related (slightly boring) but overall i think a good contest..

  • »
    »
    5 years ago, # ^ |
    Rev. 3   Vote: I like it -41 Vote: I do not like it

    Dislike . Seriously man — why . aren't you enjoy or learn Ashishgup contest ?

    edit: I failed but enjoy and learn so much (:

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

    Someone: "interesting contest, good luck"

    Codeforces Audience: DISLIKE

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

      If he/she is higher rated(more than CM) then,,

      Codeforces Audience: LIKE-LIKE-LIKE (:

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

I hope we are not stuck on A and B for eternity this time.

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

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

    Now, it has become really difficult to make good memes. There is so much competition on Codeforces.

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

    current post with the most likes and good meme

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

All of my AshishGup rounds have gone really bad (0 problems and 1 problem solved), but THIS time, REDEMPTION time. Gl to everyone who has also suffered till now like me. :D

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

genius problems with short statements!
As a tester, I recommend you to participate.

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

I'm ready for atleast 2 penalties in problem A
Edit : I didn't notice this, my bad
Based on past reviews, we have: Tried to make A easier and make the difficulty gradient a bit better

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

    What eventually happened — more people successfully solved B than A.

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

Another interactive problem by FastestFinger?

»
5 years ago, # |
  Vote: I like it -30 Vote: I do not like it

Every round of Ashishgup has been penaltyforces for me
![ ](

)
»
5 years ago, # |
  Vote: I like it +124 Vote: I do not like it

Ashishgup contest exist !! Everytime -_-

»
5 years ago, # |
  Vote: I like it -16 Vote: I do not like it

Ah shit, here we go again

»
5 years ago, # |
  Vote: I like it -20 Vote: I do not like it

Ashishgup round! I am super excited!!!!! Hopefully I'll at least solve A this time :D

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

Having tested some of the problems, I can confirm that they are very interesting and all the statements are quite short! If you participate, you are likely to enjoy the problem-set, as I did!

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

Weekend=Ashishgup Round

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

The frequency of Ashishgup round is increasing exponentially :P btw, i enjoyed his previous two rounds.

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

An army of testers!!

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

Another one ! Excited btw.

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

Here before AshishGup becomes the top contributor on Codeforces! XD

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

FastestFinger is ready to provide the fastest editorial (after the contest) :)

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

I gave one Ashish round before and it boosted my ratings. Hopefully, this will too.

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

Announcement writer panel of codeforces:

Educational rounds: awoo

Division 3: vovuh

Division 2: Ashishgup

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

This is the third round by almost same set of authors within less than a month, so I am curious; is the long contest approval queue issue fixed, or the contests of popular authors (i.e. those known to make a quality problemset) are processed out of queue?

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

    One of the reasons could be that these authors being experienced, require lesser iterations to get their problems/contests approved?

    Also, knowing FastestFinger personally, he recently switched jobs and got a little bit of free time in between and as a result he could focus more on creating problems. He had a few ideas in mind for long just didn't have the time, similarly, I guess Ashish is in his final year at university, and due to Corona, the academics have been paused so probably he also is able to dedicate time to designing quality problems. I believe something similar should be the case with other authors too.

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

      Sure, the round coordinators may have found all the problems submitted to be of good quality.

      But for that round coordinators need to view the submitted problems. Until an year ago at least, it would basically take forever (months!) for your contest proposal to be even viewed, because coordinators were overburdened with proposals.

      That's what I was asking about. Do contest proposals now take less time to be reviewed now? Or are authors who have prior experience setting good contests given priority?

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

        Oh! I thought you're talking about the delay post the first approval. My bad!

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

        I've proposed a contest 7 weeks ago, no answer.

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

          That answers it then, the queue situation hasn't improved much, if at all.

»
5 years ago, # |
  Vote: I like it -11 Vote: I do not like it

Wrong answer on pretest2

»
5 years ago, # |
Rev. 5   Vote: I like it -47 Vote: I do not like it

Deleted

»
5 years ago, # |
  Vote: I like it -73 Vote: I do not like it

Yet another Indian contest!!!

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

what are ad hoc problems ?

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

    These are problems for which there exists no general technique or algorithm, i.e. no well-studied solution. Each ad-hoc problem is unique, and requires a specialized approach.

»
5 years ago, # |
  Vote: I like it -45 Vote: I do not like it

Whaaat?? Now you are telling here you reduced the number of adhoc problems, in next contest announcement, someone would say there would be a dp problem, then after sometimes, maybe we would eventually end up to see some setter say C would be binary search, D would be dp, E would be dfs and so on.
Please, don't give spoilers.

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

    Wtf!? Spoil? Which part is the spoil part? When you see a problem you can recognize which problem is adhoc and wich one is not. And it doesnt realy matter in the solution.

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

    I think you are right. Any insight comment about problems of upcoming contest is to much. It is like little boys want to be important: "I know something you don't know, haha".

    This is espcially true for testers comments, but also true for problemsetters. Why not talk after the contest about it?

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

Ashishgup authored 6 contests and already number 5 in the top contributors list. That shows the quality of the rounds.

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

    already number 5 in the top contributors list mostly because of the presence of the large Indian community. But, of course, there's no doubt about the quality of the rounds.

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

    quality with popularity **

»
5 years ago, # |
Rev. 2   Vote: I like it -36 Vote: I do not like it

Looking forward to some interesting problems!

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

At this rate In 5 or 6 month of time ashish gup will have more contribution than mike himself

»
5 years ago, # |
Rev. 5   Vote: I like it -21 Vote: I do not like it

Deleted

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

Ashishgup!! One of the finest problem-setters.Hope I'll solve till B this time :D

»
5 years ago, # |
Rev. 3   Vote: I like it -16 Vote: I do not like it

Has MikeMirzayanov already made aryanc403 coordinator of codeforces??..

For those who don't get it

PS : Although it's not daily, atleast it's weekly..

»
5 years ago, # |
  Vote: I like it -94 Vote: I do not like it

The round seems to be unfriendly to Chinese participants. And when will tutorial be published?

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


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

    Sorry If I hurt your feelings .

    But to be honest, Atcoder GC is not for Div2 people :(

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

      It may be difficult but still we can attend it. AFAIK Quality of the questions is really good.

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

    its like relay contest

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

Maybe this time it will succeed

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

Thanks to everyone commenting about it, I am starting noticing that there is a pattern to every Problem Setter, some tend to use bits too much and others are good in questions with edge cases.
The last time I participated in @Ashishgup's #646 I was able to solve B but couldn't do A and C, which proves a lot of the comments down below :P

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

At least now I would be able to solve "A" problem

»
5 years ago, # |
  Vote: I like it -14 Vote: I do not like it

Ashishgup rounds have been good to me, hopefully that continues :)

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

I want to share something which got into my head suddenly..as.. "More time you spend on paper and pen...less time you need to debug". How many of you agree to this...I liked it very much so thought to share with you guys..if you apply this it can be very helpful.

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

    More time you spend on debugging, less time you need to spend on paper and pen.

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

      But while contests it can be very risky because there are penalties for wrong answers...so you may loose points...

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

    Thats correct i always do that! But thinking to implementing some problem when it solved is very important too. Just put 5 min to think about the implementation and then start coding it will be great and your wrong submission will be decreased :)

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

    And here I rarely use a paper and pen while giving contests

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

Looking forward to solve atleast 2 questions in less time. In previous Ashish Gupta rounds, I struggled a lot to solve question 1. Who's with me?

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

People need to understand They are not getting a rating update for making memes !

»
5 years ago, # |
Rev. 3   Vote: I like it -17 Vote: I do not like it

none of them like my comment so i delete it

»
5 years ago, # |
Rev. 3   Vote: I like it +29 Vote: I do not like it

A wasn't hard — it just required reading skills. When you are rushing through A and B it's very easy to misread the task and fall into trap of initial misunderstanding. It happened to me during your last round with A (where I read that we can't use adjacent cells, not the whole row or column) and during Global Round 8 with B (where I read that you should get the exact value of k, not >= k).

These are small mistakes, which can make the task way harder. You don't know how to solve it, at the same time, you see that a lot of people can, you get confused, you don't know what's going on — it also impacts your perception of the subsequent tasks (if A or B is that hard, how hard the next tasks could be?), blocks your thinking, raises your stress level and the whole contest is ruined and your rating goes down big.

Because of this, I prefer div 1 rounds (at which I can't currently participate) or TopCoder — where you have a smaller number of harder tasks and there is no need to rush. Nevertheless, I still think that the coder should know how to read the task, so I will keep trying.

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

    No matter how many times i make the mistake, i continue doing the wrong thing. :(

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

It's raining contests on codeforces.

4 contests within a span of 10 days.

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

    i wish there was a div3 between the educational-90 and div2-#653

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

Ashishgup again?

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

relevant memes in editorial is the coolest part

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

Ashishgup orz!!!

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

nyo me adhoc problems :(

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

Ratings in Ashishgup 's round

»
5 years ago, # |
  Vote: I like it -7 Vote: I do not like it

Previous contests from Ashishgup here

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

    reasoned dislikes, I understand, let's get more dislikes: D

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

Personally, I love Ashishgup's round. Because his statement was short and clear.

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

contest created by Ashishgup are really exiciting

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

Again, we have 4 div2 contests in a row without any div1..

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

3a7as7

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

    This is a really awesome comment! I don't understand why there aren't more upvotes on this. Maximum appreciation wsxx!

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

Cam someone please explain the meaning of ad hoc problem?

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

    Please read upper comment (:

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

    It's Basically Like Building Up A Soln For A Particular Problem as In It would Work Only For That One Problem unlike Greedy And Dp. More or less it's Like Constructive Algo.

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

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

Will there be an Interactive problem?

»
5 years ago, # |
  Vote: I like it -11 Vote: I do not like it

Ok, road to -100 сontribution

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

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

I think the next contest is vovuh's div.3 looking forward to it!

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

Is it a rule to have authors as characters in problems in all Indian contests?

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

    It's a little bit of obsession with the name.

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

    Isn't that fun?

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

      Well, it's better to use a name that exists in real life than an imaginary name.

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

      Is not at all, is harder to type those names instead of the usual "Bob" and "Alice".

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

        Who said you to type it everytime.. You could have just copied the two names in local string variable and printed that instead.. It would have even easier than your Bob and Alice..

        • »
          »
          »
          »
          »
          5 years ago, # ^ |
            Vote: I like it -12 Vote: I do not like it

          That is what I should have done, but you can see that is in fact a problem if we need to add more lines of code and does not contribute to make the problem any better. I did not type the names not even once time because could not type a name like "Ashishgup" if is not from pure memory.

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

A easier than previous Ashishgup rounds' A

B required observation, comparatively easy

C lovely problem, needed more observation

D most appreciable problem in the contest

I highly appreciate the problem statements. Strong pretests were really an additional advantage. Thanks for such a great contest!!

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

    E requires clever thinking, was easier than C and D IMO. But it requires a good mathematical proof. Also most of the users didn't even bother solving E after failing at D.

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

all problems except D are amaaaaaazing

»
5 years ago, # |
  Vote: I like it -37 Vote: I do not like it

You should really clarify the word optimal in Ques C

there are multiple paths and we can't know which one is optimal

To explain clearly there are cases where optimal can mean ASHISH dividing by the greatest Odd divisor first and lose or dividing it in such a way that he will win later on

This should be clarified, i tried multiple answers and none of them pass the pretest 2, not even the simplest ones and not even the complex ones.

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

    You might wanna give a read to game theory for combinatorial games. It was a question from that. I was also reading it during contest :)

    (I was able to do it)

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

    optimal is simply the one which leads to win. That is common sense I suppose!

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

    Optimal is how you play for most favorable income. That mean Ashish will play in a way that he will always win(if he can) and same for the opponent.

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

    Bro u better delete that comment to avoid downvotes. Just a suggestion.

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

D is the sexiest problem , great work guys .

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

    Can you share your approach?

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

      Basically you need to focus on making odds or evens as optimal as other will not affect as min is taken. Now they have to be alternate also. Now if you observe, you will find that you could binary search the max of one sequence and after taking the indices of all less than that max, try to assign alternatively and if it's possible, then lower the value. Take care of adjacent indices.

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

    My initial thought is solution is equal to finding a subset with floor(k/2) elements with no consecutive drafts from the array. To solve this I thought (k/2) * n dp array is enough but it seems like it exceeds memory limit.

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

What is pretest 10 for problem E?

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

    I passed, after WA in 10 tc, debugging this:

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

      Thanks for the help!

      But unfortunately, my code works for this test case.

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

    I also got WA on 10th test case.

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

Was D dp with binary search? UPD: Solved with Binary search.

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

    I did it with binary search but was getting WA on pretest 10. I couldn't find the mistake of my code.

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

      try

      7 6

      1 2 3 1 2 4 1

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

        My code gives 2. Is it true?

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

          it's true

          but my code use a simpler way to check:

          int a[N],d[N];
          int n,k;
          int check(int v) {
              if (a[1]<=v) d[1]=1; else d[1]=0;
          
              if (d[1]>=k) return 1;
              for (int i=2;i<n;i++) {
                  if (a[i]<=v)
                      d[i]=max(d[i-2]+1,d[i-1]);
                  else
                      d[i]=max(d[i-2],d[i-1]);
                  if (d[i]>=k) return 1;
              }
              return 0;
          }
          
        • »
          »
          »
          »
          »
          5 years ago, # ^ |
          Rev. 2   Vote: I like it 0 Vote: I do not like it

          if k odd, I add a element 0 to front and change k++ n++

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

How to solve D?

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

    bin search by the answer. It's rather easy to check if a given min-max is achievable

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

      How can we check if a given answer is possible?

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

        we try to fit odd positions and we try to fit even positions. In either case we greedily check if there is a subsequence of element < target with gaps in between

        i = begin_i num_to_take = ... while i < end_i and num_to_take > 0: if vs[i] <= max_v: i += 1 num_to_take -= 1 i += 1 return num_to_take == 0

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

    I'd solve with Binary search For fixed C value: 1. fix even position, add odd position any element, for even positions add <= C. 2. fix odd position: add even position any element, for odd position add <= C.

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

What is the test case 10 of problem E?

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

ParityForces !

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

In problem D, the optimal sequence is always a substring?

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

    Nope, consider the following test case for K = 4:

    3 1 2 2 2 2 2 1

    An optimal sequence is 3, 1, 2, 1, which is not a substring.

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

    Not necessary n=6,k=3 1 1000 1000 1000 2 3 answer will be 3 by taking 1,2,3

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

      It's better to choose 1000, 2, 3. Answer will be 2

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

        Just make k=4, then it won't be continuous

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

What was test 10 on problem E?

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

    my code fails this:

    18

    111011100100100100

    000100011011011011

    I think the correct answer for this is 5.

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

Since, sum of two even are even as well as sum of two odds are even. So, I took n-1 such pairs such that either at those indices sum of the elements are even i.e I took a pair (even,even) or (odd,odd), actually not the elements, rather their indices. Suppose we place these elements [the sum of those] in b then b will contain all even numbers. So, GCD of all of them will be 2 or any other even number i.e. GCD>1 in all cases. But my code gives WA, can anyone explain why ?

Testcase=int(input())
for _ in range(Testcase):
	n=int(input())
	arr=list(map(int,input().split()))
	odds=[]
	evens=[]
	for i in range(2*n):
		if arr[i]%2==0:
			evens.append(i+1)
		else:
			odds.append(i+1)
	cnt=1
	#print('#',_+1)
	while(cnt<n):
		if len(odds)>1:
			a,b=odds.pop(),odds.pop()
			print(a,b)
			cnt+=1
		if len(evens)>1:
			a,b=evens.pop(),evens.pop()
			print(a,b)
			cnt+=1
  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    elif? You actualy can at exit from loop get $$$cnt > n$$$. Let's say $$$cnt = n - 1$$$ and both ifs executed. Then you write in output all numbers

»
5 years ago, # |
  Vote: I like it -8 Vote: I do not like it

I enjoyed the problems. It was a nice contest. I hope for a rating increase.

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

    Go to CF-predictor and it tells you your rating change. (Its also a browser extension for chrome:))

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

      Unfortunately CF-Predictor has not shown an accurate result recently. Apparently the point is a change in the rating system.But still shows an almost correct result.

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

I know that strong pretests are generally a good thing, but having 0 hacks in the whole contest seems a bit extreme...

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

    My B failed in system testing due to a simple case where number of even/odd numbers == 2!

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

Ashishgup and FastestFinger play a game.

Sounds bad

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

I liked the contest but isn't the gap between C and D too large?

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

    D was easier than C for me .

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

      It is easy for you if you know dp (in my opinion it is solved through dp). C is the simplest division of a number into divisors. And the number of solved C and D (4700 and 700) suggests that it’s easier to split the number into factors. :D

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

        i solved it without dp it is easy if you know binary search on the answer

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

          Hmm. thank you for idea, but agree, dividing x by y is easier than implementing a binary search by answer :)

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

Folks, how do I see the pretests failed? I can see only the first OK's on my submit page. Should I just wait till the full test finishes?

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

Best difficulty gradient ever!

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

i think if i had five min more i could solve D :(((

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

Loved the contest. Can't thank the setters enough. It was probably the perfect Div 2 I could ever ask for. And the quick editorial as ever. AshishGup and FastestFinger never fail to impress!

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

I really enjoyed problem C not too hard not too easy it's just how it should be

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

Ashishgup's contests make me realize how much i lack in constructive and how dumb i am :(

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

    At least you didn't waste 20 min on A XD like how I did I feel so dump

»
5 years ago, # |
Rev. 2   Vote: I like it -17 Vote: I do not like it

My previous post was receiving a lot of downvotes. So I have removed it

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

    I assume you realized the trouble. You should not share anything "during" the contest. You might want to record and upload it after the contest, just like the grandmasters' screencasts.

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

Ashishgup Orz. 3 great contests 3 weeks in a row!

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

My screencast of the round (solutions at the end)

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

Thanks Ashishgup! Problems were really nice and very interesting! I will wait for your the next round.

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

My C solution:

idea

code 1: 84456260

code 2

Good Luck

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

Does anyone know why this gives TLE for B

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it
    Testcase

    i < e.size() - 2

    if size of e is 1 then e.size() - 2 overflows and become very large values because e.size() is of type unsigned.

    i'd suggest to always write it in form i + x < e.size() to avoid such issues or you can typecast it to int like i < (int)e.size() - 2

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

IMG-20200620-232439

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

Ashishgup and team really do come up with some interesting problems everytime..Always new things to learn everytime!

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

Nice problemset! really enjoyed! problem E might get more AC if E came before D.

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

To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove the cheaters, fix wrong division cases and update ratings them again!

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

    Thanks for fast update.

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

    Hi Mike! Please also update problem ratings fast. It took 2 days to update the problem ratings in the Global Round :( Thanks!

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

    Please Mike, why you keep saying you care about cheaters? If that were true you would do something about this https://mirror.codeforces.com/blog/entry/75610 for example. And at least add a way to actual report this people. But no problem, keep ingoring users that only want fair contests ...

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

I'm getting TLE in this code of E problem . Can anyone help please ? ```

https://mirror.codeforces.com/contest/1370/submission/84518033 ``` Ashishgup FastestFinger

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

I found E easier than D. D's implementation was little tough so I proceeded to E. Best choice of my Life.

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

    I actually didn't find the implementation for D difficult. I believe the observation was more difficult to make.

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

      Actually I was thinking another solution which was getting hard to implement. We usually go with the first soln that comes to our mind.

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

Is there someone else who solved D with DSU?

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

    Ya buddy!! well failed in contest though... Here is the submission 84521452

    Btw did anyone solve D using dp??

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

      can you share your approach

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

        Ya sure... i used the concept of forming segments of visited indices using dsu.. If the length of a segment is increased to become odd, increment the counter... If the counter>=(k/2) print the value at that index...

        U may need to take care of some boundary cases if counter ==k/2 :

        1) valueAt(0) and ValueAt(n-1) can't be in the same segment if (k%2==0).

        2) if (k%2) , if 0 is the starting index or n-1 is the ending vertex , counter should be equal to (k+1)/2

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

I wanna know why Ashishgup left my contest (Code Chronicles 1.0) midway yesterday ? I was so happy to see him solve our questions. Anyways his contest today was beautiful. Thanks to him I became an Expert on CF. I think Ashishgup read my comment on his previous contest. xD

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

    I must say, your contest was good. Although I took it casually as it was unrated but still I got a good rank. That's when I realized that being calm is very important during a contest. What you learn from the problems is much more important than your rank. Thanks for the lesson :)

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

      Glad you liked the contest! Although it was unrated we had put in lot of efforts to create a good problem set. :)

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

        The problems were actually really good. I hope, we'll get to see more contests from you. :)

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

I am a bit confused. This was my first contest on Codeforces. I got a +396 and I am a newbie now. I thought the minimum ratings were 1500. What is happening?

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

    They changed the rules. Now, your rating starts from zero and will stabilize in 5-6 rounds hopefully. It's better because with the previous rules there was a decline in the ratings for almost every new participant and it didn't look good.

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

      What exactly do you mean by "stabilize in 5-6 rounds"? Also, if you have the link to the blog post mentioning the change of rules, kindly provide it. Thanks!

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

        I mean you'll be closer to the ratings you actually deserve. Here is the link to the official blog post.

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

Here as the virtual Moss for Codeforces, busting cheaters and getting them out of their bills. I hereby present you another team GStnt and ymkzpx.

Congrats to both of them, Experts -> Candidate Master.

Solutions :

D : 84460179 and 84450653

C : 84458183 and 84460019

Ashishgup MikeMirzayanov isaf27 I guess these both shouldn't be the part of Div1

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

nice contest! I got to yellow. hopefully this is my last rated div2 contest ;)

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

I wasted my whole time in problem C later found that it could also be done by just simulation of the game and memoization.

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

    You didn't waste your time ; you worked harder towards solving it .Cheers !

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

I have a question about F1. When I check my submissions I see the following test 2:

1
4
2 4
1 2
2 4
4 3

I guess that there should be 3 edges and the last pair are hidden nodes. However, there is a double edge displayed. Is this just an error in a display or an incorrect test or am I missing something?

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

    If you read the “hack input” part of the problem statement, you will find actually the first pair are the hidden nodes.

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

Thanks for the round. Especially the prestests were exceptional.

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

Guys u can refer below link for problem A and B. https://youtu.be/0WYFThVN-GA?sub_confirmation=1

Guys u can refer below link for problem C. https://youtu.be/Tgy6lTxBPwk?sub_confirmation=1

Guys u can refer below link for problem D. https://youtu.be/s_XIa9sVaF0?sub_confirmation=1

Guys u can refer below link for problem E. https://youtu.be/Uirs77-Urp0?sub_confirmation=1

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

Hi MikeMirzayanov please see this solution. How this solution passed? I think this is a bug which should be fixed.

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

    what is the bug

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

      He printed same indices again and again. Like
      1 1
      2 2
      3 3
      which can't be the solution.

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

    There is definitely something wrong with this submission.

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

    I guess the checker must be wrong !!

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

I got this message from Codeforces today. Attention!

Your solution 84481546 for the problem 1370C significantly coincides with solutions Aiman11/84481546, mission_thunderbolt/84487119. 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 used ideone.com to check the code i had written from scratch as my compiler was not working. I was not aware that the code could be copied by anyone from there or there was a public mode. I am really sorry and this mistake will not be repeated in the future. Please do not take any action for a mistake which was unintentional.

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

    For the first mistake you are simply expelled from the contest. After all, not knowing the rules does not exempt from responsibility.And for the future, ideone has secret mode.

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

Any other person except CM Or MASTER Posts something : Random CF User with 10 submissions : Ohh It's Too hateful let's downvote it

I mean whats all the rage abt?!