Ashishgup's blog

By Ashishgup, 7 days ago, In English

Hi everyone!

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

We had two approved contests, but decided to merge it into one with more logical thinking ^_^

The round Codeforces Round #685 (Div. 2) that will take place on 21.11.2020 17:35 (Московское время). 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:

You will be given 6 problems with one additional subtask and 2 hours 15 minutes to solve them.

Good luck — let the games begin :D

UPD 1: The revised scoring distribution will be: $$$500 - 750 - 1250 - 1750 - (1500 + 1000) - 3000$$$

UPD 2: Editorial — Hope you guys enjoyed the round, we will hopefully be back sometime next year :)

UPD 3: Congratulations to the winners! :D

All Participants:

  1. noimi
  2. I_Love_Convex_Hull
  3. zhouzhendong
  4. dlalswp25
  5. peti1234

Official Participants:

  1. I_Love_Convex_Hull
  2. 221
  3. afterall
  4. Khas_Profit_LLC
  5. imzzy
 
 
 
 
  • Vote: I like it
  • +1088
  • Vote: I do not like it

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

As a tester, I haven't tested yet.

EDIT: I have just tested, and would like to say Ashishgup orz

»
7 days ago, # |
  Vote: I like it +61 Vote: I do not like it

Well that was a pleasant surprise, yet another Ashishgup round :)

»
7 days ago, # |
  Vote: I like it +3 Vote: I do not like it

Indian Round

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

.

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

If I am able to solve problem A easily then it's not a Ashishgup round i was expecting.

»
7 days ago, # |
  Vote: I like it -28 Vote: I do not like it

Looks like Ashishgup didn't get placed LOL so he is setting up contests.

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

    forget about him if he is placed or not are u placed or not ? he is already a grandmaster and u are saying he is not placed , what are u saying please check to his linkedin profile !! you will say then pikmike tourist vovuh and all those who are preparing contests for all of us are not placed !!

    don't make any assumptions yourself !! attend the contest solve the problems !!

    Hoping for a good round with good problem sets ashishgup as always!! all the very best everyone !!

    • »
      »
      »
      7 days ago, # ^ |
        Vote: I like it -7 Vote: I do not like it

      Chill bruh was making a joke.

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

        Fun fact: Jokes are supposed to be funny.

        (I know comedy is supposed to be subjective, but this was objectively unfunny.)

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

    These guys have 100 hrs in a day!

»
7 days ago, # |
  Vote: I like it +25 Vote: I do not like it

AshishGup round:- Be ready for Interactive problems :)

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

there is div3 contest this month or not ?

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

    Yes.. After 4 days div3 will be held. See the codeforces calendar. You can add it with your google calendar. It's so helpful.

»
6 days ago, # |
  Vote: I like it -17 Vote: I do not like it

Another Indian Contest...... India OP!!!

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

    you're right, it's very OverPopulated

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

      India Over Powered . . . . More population means more downvotes on your comment

      • »
        »
        »
        »
        6 days ago, # ^ |
        Rev. 2   Vote: I like it -46 Vote: I do not like it

        yeah overpowered caste system, religious violence, corrupt low iq leaders, trashy education system, garbage filled streets....

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

          Though these all... We are doing exceptionally well in various fields... And you are commenting on the contest made by an indian...

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

            who I'm pretty sure relied on external sources for his education, there's nothing Indian about it. If anything, he reached this level despite what India had to offer in terms of education.

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

              please do not show your pessimism over here, even I am an Indian and gone are the days when we needed to solely rely on external(Here I think you mean foreign country) resources because we have our own set of good programmers and resources now thanks to many great efforts mostly in the form of YouTube Channels(Especially Codechef nowadays and individual efforts too by striver_79 demoralizer kazama460 and many others too.). But just think would we all would have grown to the extent that we are individually as a University or from any single Country. No, the sharing of knowledge and the Competition makes us all grow better and faster.

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

                I'll probably be downvoted here but just being honest.

                I myself relied a lot on external sources.

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

                  Everyone has to initially..

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

                  Support the indians in the argument cmon man.

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

                  Right, we all have learnt from external resources. I don't see how, it is a bad thing though. It just shows we are eager to learn and contribute further building on what already is there. Don't forget the good things people have to say about Indian youtubers(speaking of external resources) teaching stuff. Also More Population = More Competition = Better Stuff in the long run.

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

                  You're missing context here. The guy above was justifying India's greatness by saying that this round's setter is an Indian, and i was simply saying that India had very little to do with how skilled he is rn, and that he mostly relied on external resources for learning, like most Indians here.

                  "Also More Population = More Competition = Better Stuff in the long run"

                  Overpopulation is almost always a bad thing, there are a lot more disadvantages than advantages.

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

                I'm simply trying to refute the comment above that says India is OP when it's clearly not, i don't get what your point is. I don't mean to belittle the efforts of those "Indian" programmers, but let's be real here, their channels talk about a very small subset of what is out there related to CS, do you really think that's equivalent to a quality CS education? Also we're talking about a very small minority here(competitive programmers), most students are just having their time wasted by the system as we speak. For sure there are talented people in India too, all I'm saying is the system is only slowing them down.

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

                  By saying India OP.. He was just cheering up.. And maybe you had a funny/sarcastic intention but think about the subject of your comments initially.. Making fun of population of any country can be seen as rude

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

                  a statement being rude doesn't necessarily make it false, people should develop a bit of tolerance, it's very easy to live in a fairytale being in denial of the problems that surround you. Pointing out the problem or ridiculing it helps expose it.

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

                  let me ask you one thing what country are you from? because every country has its problem. i m not denying that india doesnt have problems but we are trying to solve those and even if you want to expose our problems do it in a polite manner that doesnt hurt other feelings. our roads might be filled with garbage but your mind and mouth is filled with a lot more and a piece of advice instead of wasting your time here writing stupid comments and creating controversies why dont you participate in a contest and get atleast rated

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

                  I'm Indian. Every country has it's problems for sure, but some are way worse than others, like this one. I don't think i was being too rude, you guys are too sensitive. Calling my comments stupid is easy, give me valid reasons for why they're stupid. I'm doing good in my original account.

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

                  Yeah every country has its problems and making fun of your own country's problem on an international platform is in no way gonna solve your country's problems. If you can't contribute to solve those problems then simply stfu

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

                  i disagree, i personally changed my mind about a lot of things by listening to other people ridicule and criticize my ideas, and I've seen it work for lots of other people too. Ridiculing is helpful as it exposes how truly ridiculous your opinions were, politeness doesn't always work, people don't take you seriously if you're too polite, speaking from experience. Also, I am working on some stuff atm that'll improve the quality of education here hopefully, but i wouldn't tell someone to stfu because they're not contributing, either what they're saying is valid or it isn't, them contributing has nothing to do with the validity of what they're saying, unless it's directly related to contributing.

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

                  Good to know that you are contributing to the Education but I think you should be sensible enough to not respond to those over-patriotic cringe proud comments everywhere. They will naturally get downvoted. Nothing can't be done about them. But ridiculing your own country's problems on an international platform in no way makes sense to me. If you think that you can contribute to solve or reduce the intensity of those problems. Then just do it internally. If you think ridiculing your country's problems on an international platform will expose them, then you are wrong. You will only motivate the racists that are everywhere. If you don't believe me you can read comments on this blog. It's just one example of many such occurrences. I know I am gonna be downvoted on this one. But that's what I wanted to say. Peace Out

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

                  "If you think ridiculing your country's problems on an international problem will expose them, then you are wrong. You will only motivate the racists that are everywhere."

                  I agree that there is some truth to this, I'll be more tactful next time. Yes I did expect a lot of downvotes from cringy patriots, but I said it anyway for the non-deluded crowd just to make them think about it, but i guess i could've done it in a more civil way. Appreciate the reply.

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

                  Bhai, Hum aapko hi vote denge, aap election me to khade ho jayiye, kaha aap yeh competitive programming ke chakkar me phas gaye

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

              he(and a lot of other people) excelled growing in the Indian environment even if they used external sources. And there are good sources in India as well. So, I don't see any point here.

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

                Please tell me what the "Indian environment" provides, and why aren't most people like him if it's the magic of the "Indian Environment".

                I'm not denying the existense of good sources in India, I'm saying most sources are trash.

                "So, I don't see any point here"

                You're speaking as if it's very apparent that there's no problem with our education system. Do you really think that? Do you think most teachers out there are passionate about the subjects they're teaching? Do you think they teach well? Do you think they can take criticism about their teaching without getting offended and taking it out on their students? Seriously?

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

                  Yes, there are problems. More than often, I have cursed the Indian Education System myself. But u were simply being disrespectful. There is a way to put your opinion on a public platform. I am not saying that there is some magic in "Indian Environment". I was just putting forth the point that people excel in our environment as well.

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

                  Yes i agree that I could've expressed my points in a better way, I'll give you that.

                  "I was just putting forth the point that people excel in our environment as well"

                  And i agree, there are people like that, but that doesn't necessarily mean that the environment itself is generally good, because if it were, we would see Ashish Guptas everywhere (not implying that everyone should be like Ashish Gupta, I'm just giving an example).

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

                  yes, the number of good coders in India is very less. And none of the top 20,30 coders are Indian. Even in software area we are pretty weak in innovation. That is the reason we are producing CEOs like Sundar Pichai and Satya Nadella but not people like Bill Gates and Mark Zuckerberg and Elon Musk. We have come a long way, but we still have a long way to go.

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

              Most people in any country don't start out in cp using their country's education system, at least I don't think...

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

                it's becoming very mainstream in India

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

                  its same as glass is half filled half empty if you want to live ur life seeing the negative things and ignoring the positive then thats your problem but be grateful that u r living in india people in other countries arent getting 1 per cent of what u r getting here as far as problems are concerned codeforces isnt the platform to discuss go to fb or insta or whatsapp status and write your heart out peace jai hind

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

          SALLE Bhosideke.

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

          see ya in contest hope you will prove your worth to the world

          LOL

          `

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

          Yeah India have trash education System that's why Google and Microsoft has Indian CEO and I am not like you so will not disrespect your country but you youself are trashed and useless person to have made a fake account to get entertained. Dude it's Codeforces, go somewhere else you moron.

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

            Microsoft, Google CEO is Indian, therefore Indian education system is great? Please consider taking a course on rational discourse.

            Countries are merely social constructs my friend, there's no need to get too emotional.

            "Dude it's Codeforces" So?

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

          I am offended by something I completely agree with.

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

    ah, whats an Indian round without a mandatory thread like this

»
6 days ago, # |
  Vote: I like it +33 Vote: I do not like it

This guy Ashishgup has different level fan base.

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

    Since I know and following him, because of his quora activity.

»
6 days ago, # |
  Vote: I like it +18 Vote: I do not like it

As a tester, I would highly recommend this round.

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

    Machaya bhai!!!

    anyamanask, dekh.

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

      aaj kal to kya hi kharab halat chal raha bhai ... itna assignments aur projects hai ki cc ho hi nahi pa raha!

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

        hamare yha eske sath term project bhi likhne h.monday se paper h but aaj ka contest jarur dunga.happy coding

»
6 days ago, # |
  Vote: I like it +20 Vote: I do not like it

I think you should delete 'Announcement of Codeforces Round #359 (Div. 1)' ;)

»
6 days ago, # |
  Vote: I like it -11 Vote: I do not like it

What?

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

I just love Ashishgup rounds.

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

As a CP enthusiast, can I be a tester?

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

ashishgup Merging two approved Div-2 contests into one indicates we can expect round to be slightly hard and having more challenging problems?

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

Codeforces Round #685 (Div. 2) !!!

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

Welcome to another Indian round. I hope everyone good ratings.

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

    you hope, but it's not possible that everyone will have a good rating.

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

Interesting math problems expected from these setters :P

»
6 days ago, # |
  Vote: I like it -8 Vote: I do not like it

as a contestant, i want my losing rating back :)

»
6 days ago, # |
  Vote: I like it +35 Vote: I do not like it

As a tester,

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

hope I do better :)

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

div 2 Ashishgup contest

»
6 days ago, # |
  Vote: I like it -24 Vote: I do not like it

Omg Indian round! So excited

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

ohhh...!! Ashishgup round !! so excited :)

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

Kinda like the 2:15/2:30 hr format for the rounds. Hope it stays ^^

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

Is this round special for low rated participate?

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

Hope it's not like the last two rounds =)

(specially the one who had c1 and c2)

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

The great Ashishgup is back

»
6 days ago, # |
  Vote: I like it -41 Vote: I do not like it

Another Indian round means another unrated round!

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

I notice @Ashishgup is 24x7 online!! Does he sleeps over his computer only??

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

The tag of the blog Announcement of Codeforces Round #359 (Div. 1). When you open #359 you see an extra announcement in the contest materials section which redirects to this blog. Isn't misleading to use a wrong tag?

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

    I think it is a mistake. This announcement has wrongly been routed to that round. My guess is you won't find this announcement in today's round's contest materials.

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

Are previous rating changes rolled back? I can't see my rating changes for last two contests

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

I'll participate

»
6 days ago, # |
  Vote: I like it -24 Vote: I do not like it

OMG Indian Round!!! BTW Slumdog Millionaire was a good movie!

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

Sherlock Holmes inside me: a question on game thoery can be there...after seeing that let the GAMES begin

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

expecting there will be at least one game problem

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

Nikhil_Medam where you at?

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

    Probably giving a contest from your account.

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

      I asked him give more but he said free boosting is over now ;_;

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

Wow! Indian round again :D :D

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

Hoping to stay in div1

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

another bitforces will be happend

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

A > B and wrong on test 2 whenever the problem setter is Ashishgup.

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

ITS LIT!

»
6 days ago, # |
  Vote: I like it -10 Vote: I do not like it

Hope that I'll get the lost ratings in this round :)

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

one of the best problem settler ashishgup fastestfinger i hope the round and the problems will be interesting !! all the very best everyone !!

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

why Monogon gets this much upvotes more than any red?any reasons?

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

    Because most other reds are smart and decided not to waste time farming contribution.

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

      do you mean creating second account named diagon?(just a joke as I don't have any proof :rofl:)

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

        I confirm it's not him, also there's nothing like "Diagon" it's digon

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

          Again, your confirmation doesn't guarantee it's not him, but I think no one minds if it's fun :D

»
5 days ago, # |
  Vote: I like it -32 Vote: I do not like it
»
5 days ago, # |
  Vote: I like it +14 Vote: I do not like it

Nice contest, thank Ashishgup and your team. Goodluck to everyone !!!

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

ashishgup orz.

This guy has a different level fan-base.

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

     Eva

    (Also, since I'm not a setter/tester of this contest, this is veryyy irrelevant)

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

      You can become one. Just join the stack outside Mr Gupta house.

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

Thank Ashishgup and your team for creating a contest for us ^_^

Thank Codeforces for creating a contest site.

Goodluck to everyone !!!

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

    Seeing Indians Coders on such a Great Platform makes country feel proud!!!! Good Job Indians!!! Let's Rock

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

Just asking since E1's score is 1500, will it be easier than D whose score is 1750 ?

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

    On last div2(not edu.) B's score was 1000 and C1's 750. Was C1 easier than B?

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

      there were two problems c1 & c2 (both combined are considered as one problem because one is subtask of another) so, total 750+750 = 1500 score.

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

    You don't trust scoring distribution nowadays. Especially not in Ashishgup's rounds.

»
5 days ago, # |
  Vote: I like it -27 Vote: I do not like it

I hope there is no game theory problem.

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

Indian Testers?? Wow Great..

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

I am confident enough that this round is going to be div 1.5

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

It's time for Ashishgup to make a jump in the top contributors list.

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

D was a fun problem

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

Wishing high rating to all of you. Good Luck for the contest

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

I'm not able to register for the contest. what to do?

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

good luck for everyone

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

Nice contest Ashishgup

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

Got destroyed

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

D has the similar idea with AGC002E.

E1 and E2 is really interesting.

Thanks for the contest :)

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

How to solve C?

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

This is whining because I made several wrong submissions, but I think A is too hard. I think A in any contest should be trivial to every official participant ­— more like a registration button than an actual problem. If we are talking about div 2, it should not contain almost any observations, just implementing what you're reading.

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

    A is trivial. Look at the number of submissions

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

    I got 4 WA on A and almost kill myself when got AC

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

    Lol

    Seems like you're new to Ashishgup rounds

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

    it should not contain almost any observations, just implementing what you're reading

    Then people will say they were judged in A on the basis of typing speed and not thinking skill.

    There should be some sort of idea involved , it can be very basic though for A .

    Note : I solved A after more than 3000 people solved but i don't think it was not suitable for being A.

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

    If I may offer my opinion as a tester, today's A is more prone to being WA'd by higher rated participants than lower rated participants, more CM+ testers went along the wrong route of divide then subtract than our specialist / expert or lower testers. Also I am curious what your solution was? The intended solution was min(n — 1, 2 + (n & 1)) (Odd -> Even -> 2 -> 1).

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

    yep, this made me leave this contest also somewhat similar to this problem : https://leetcode.com/problems/minimum-number-of-days-to-eat-n-oranges/ .

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

    A had literally 1 observation: if n is even, it can be reduced to 2 in 1 step. Also all the corner cases were already present in the samples.

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

    Many other A's in div2s are like that (not direct implementation). Its better that way maybe as there is also a div 3

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

    I know that feel

    Spent 25 minutes and two WA on A

    But somehow it was obvious for thousands of other contestants

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

      I was so frustrated that I couldn't solve A. Ruined the whole contest for me. Solved B and went to sleep.

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

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

Thanks for the great contest! How to solve E2?

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

    Let's say the answer array named A. Use the value of A[1] (which is at first still unknown) as a pivot, ask the xor value between A[1] to the rest of the number, and keep those values. At this moment, you already asked n - 1 queries.

    Then, look into your xor-s values, if there is at least two same xor result in different index (let's say index i and j), you can ask the and value of index i and j. The and value must be A[i] and A[j] since it is the same. Then conclude A[1] and the rest of the array. You only use in total n queries for this case.

    If there is no same xor values, then the array must be a permutations of 0..n-1. To find the value of A[1], you can use the index which has the xor value 1 and 2 to A[1], let's say the index is id1 and id2. Then, ask and 1 id1 and and 1 id2. From here, you know the correct bits of A[1] except for the least 2 bits. For the most right bit (the least one), you can use the result of and 1 id2 since the difference must only occur in the 2-nd least bit. For the 2-nd most right bit, use the result of and 1 id1 since the difference must only occur in the least bit. Last, construct A[1] and conclude the rest. You only use in total n + 1 queries for this case.

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

      It is simpler to look for 0 and n-1 xor values in the second case since n is a power of 2. These two numbers should differ in each bit. Then we can ask for ANDs with some third number and find those numbers with bitewise operations.

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

    It's clear that either there exists $$$a_i$$$ and $$$a_j$$$ that satisfy $$$a_i=a_j$$$, or $$$a$$$ is a permutation.

    For each $$$i>1$$$, query the XOR of $$$a_1$$$ and $$$a_i$$$ and let it be $$$X_i$$$.

    If there exists $$$X_i=X_j$$$ (this can be checked with $$$O(n)$$$ complexity), it's obvious that $$$a_i=a_j$$$, so we just need to query the OR of $$$a_i$$$ and $$$a_j$$$ to get $$$a_i$$$ and then work out the whole array.

    Otherwise, as $$$a$$$ is a permutation and $$$n\ge4$$$, there certainly exists $$$a_{k_1}$$$ and $$$a_{k_2}$$$, where $$$a_{k_1}\oplus a_1 = 1$$$ and $$$a_{k_2}\oplus a_1 = 2$$$. We query the OR of $$$a_{k_1}$$$ and $$$a_1$$$, which is equal to $$$a_1$$$ except for the last bit. Then we query the And of $$$a_{k_2}$$$ and $$$a_1$$$, which is equal to $$$a_1$$$ at the last bit. And therefore $$$a_1$$$ can be calculated, so as the array.

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

How to solve D?

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

    You look at the point with maximum x, such that (x, x) is inside your circle. If any move from (x, x) loses, player 2 wins. After the first move, the state will be (0, k) and player 2 simply plays copy-cat, (k, k). This way we reach (x, x) when it's the first players turn, so he loses. In the other case, player 1 wins. I will let you find the proof and if you can't I will provide one

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

      please give proof.

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

        you can see that $$$ d^2 >= (a * k)^2 + (b*k)^2 $$$, where $$$a$$$ and $$$b$$$ denote total up and right steps taken, now you can notice from the parity of $$$a + b$$$ whose move it is, now parity of all the maximum value of $$$a + b$$$ distance we will be same, so just calculate it, and that will be your winner.

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

        Ok, in the second case, the second player won't want to do the same copy-cat thing for every move, obviously. At some point say we have (a, a). First player moves (a+k, a). Now say this is the turn when the second player doesn't want to do the copy-cat thing and moves (a+2*k, a). Player one moves (a+2*k, a+k). Now, if player 2 wants to avoid (a+2*k, a+2*k) that results in loss, he will move (a+3*k, a+k). This constant 2*k will give player 1 the win.

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

      Update: Solved. The problem is in my loop range. Why my code gets WA? My code

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

how to solve A ?

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

    if N is even then ans is 2 else ans is 3 base case is for n=1,2,3

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

    The question states that division by proper divisors is not allowed. So, it makes sense to keep the number even all the time. If you keep it even, you always can divide by its greatest proper divisor i.e. n/2.

    When n is odd, decrease it by 1. When it is even, divide it by n/2 (the greatest proper divisor). This is the optimal strategy.

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

    Prime number was not important. Just even odd number.

    If you subtract 1 from the odd number, you will get an even number. An even number can be made 2 in just one time.

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

How to solve problem E2 ?

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

    My guest is to solve with the case of n = 4, then find use the same code for the case n > 4, but I have not figured it out yet :((.

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

    Actually, there is a method to deal with 1451E2 - Bitwise Queries (Hard Version) with no more than n queries and the contrast that n is a power of two is not needed.

    Queries XOR 1 i for $$$2 \leq i \leq n$$$, the return value store in an array a.

    If all elements in a are all disjoint, then the ans[1] must be the only number in [0, n - 1] which not appear in a~.(**not true**)

    Else there must be at least one pair $$$2 \leq i,j \leq n, i \neq j$$$, such that a[i] == a[j], so query i, j, the return value will be ans[i], so ans[1] = ans[i] ^ a[j]

    Then ans[i] = ans[1] ^ a[i] for $$$2 \leq i \leq n$$$.

    Sadly, I had a handwrite mistake in my code and I'm not good at debugging Interaction problem, so I don't pass this problem in this contest.

    UDP: sorry, my method have a bug, thanks to ExplodingFreeze

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

      Distinct xors will not be sufficient to calculate a distinct array, consider:

      xors:0 1 2 3

      This can be 0 1 2 3 OR 3 2 1 0

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

        Note that a[i] donate the return value of Queries XOR 1 i. so I don't understand you.

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

          Sorry, I misread your original comment, check my updated comment now.

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

        I think in this case you have to use the fact that you will have XOR of all ones somewhere. So you have $$$a$$$ and $$$b$$$ with exactly opposite position of 1's. Then you take a third number $$$c$$$ and query $$$c$$$ AND $$$a$$$, and $$$c$$$ AND $$$b$$$, the OR of the two results gives you $$$c$$$ (and then you know the whole array because you have XORs).

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

WHAT THE HELL WAS PRETEST 2 OF C ..!!! :-(

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

    +1

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

    I am afraid you did not consider alphabetic order. For example, 'jjjj' and 'eehh' should print "No" since j cannot be e. I passed pretest 2 after considering it, ultimately failed though :(

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

How to approach problems like D in general? Is there any specific approach? This time I was able to guess the solution for D after thinking for an hour.

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

    In this D I used Hit and Trail LoL.

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

    Well you notice that you need exactly some linear number of operations. So inuitively you just find all a1^a2, a1^a3 ... a1^an. We do this because, from here, if in three operations we can get a1, a1^a1^ai = ai for any i. And the way to get a1 is to also find a1&a2, a2&a3 and a3&a1. Now all you have to do is notice that s1 = a1+a2 = a1^a2+2*a1&a2 and so on for any two numbers. Solve these three equations and three variables. you'll get a1 = (s1-s2+s3)/2. And then we are basically done. Total n+2 ops.

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

    Here's my approach. I hope you are familiar with the traditional Nim game of 2 piles in game theory. i.e.

    Suppose there are 2 piles of equal number of stones and in one move a person can remove any non-zero number of stones from a single pile and the first one to run out of moves loses the game.

    The winning strategy for the 2nd guy is making the same moves as that of 1st guy but in the opposite pile to that of 1st guy. The idea behind this strategy is to maintain symmetry at every point in the game.

    Now if you observe carefully, similar kind of symmetry is prevalent here. A move in horizontal and a move in vertical direction is equivalent to moving a distance of d*(sqrt(2)) radially along x = y line. so when our opponent makes a vertical/horizontal move, we counter it with a horizontal/vertical move respectively in order to maintain symmetry.

    By ensuring that this symmetry is maintained throughout the game you can figure out the strategy for optimal moves just as done in nim game.

    Hope this helps a little :P

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

That was an OP contest. Really good stuff.

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

for E1 i found xor, and of a1, a2, then xor, and of a2, a3, then found a1 + a2, a2 + a3, a1 + a3 using some formulas, then i tried to find rest a4, a5 ... using xor a1 ^ ai. got wa4, was i close to right solution?

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

    I use the same method and got passed, don't know about the actual test case tho.

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

    I was trying the same idea but this will lead to n+3 queries.. Couldn't reduce it by just one :(

    E: found the issue, you can get a^c from a^b^b^c

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

      Actually, if you know a1 xor a2, a2 xor a3, then you can know a1 xor a3 = a1 xor x2 xor a2 xor a3.

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

        So how can I find a1 anyway?

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

            What a bitwise math. Thanks!

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

            ANDAC = ANDAB & ANDBC;

            Well, This is wrong.

            eg) a = 1, b = 0, c = 1

            a & c is 1 but (a & b) & (b & c) is 0.

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

              Oh i get it, thats why i got wa4, thank you

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

        Ohhhhh.... damn.. sad I was v v close :(

        ty anyways!

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

      if you know, a^b and b^c, then a^c = a ^ b ^ b ^ c, no need to query it. Same with &

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

How to do D :(

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

    think about symmetry strategy, for example:

    (0, 0) =>

    (0, k) =>

    (k, k) =>

    (k, 2k) =>

    ....

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

    Just go through all the x coordinates and find corresponding y cordinate using circle equation. Now take max(x/k+y/k). If this max is odd then Ashish wins!

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

    Each player can push the game to the maximum number of safe moves by increasing the smaller axis.

    So, the answer will be whether that maximum number of safe moves is even or odd.

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

Anyone who faced issues (TLE) in C with python?

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

wrong answer Integer 0 violates the range [1, 4]

what is the meaning of this? I was getting this on the contest in problem E1.

this is my code:

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

    You have to output a number from 1 to n for index... 0 isn't allowed

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

      I'd tried with 0, but same message. And In the problem it is said the index is [0, n-1]

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

        Elements' values lie in $$$[0,n-1]$$$.

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

        That shows 0 < a[i] < n for each i ... but what you have to output doesn't relate with the value... our array : a[1], a[2], ... a[n](there is no a[0])

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

    The array is $$$1$$$-indexed.

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

    in your query, you have to do

    cout << s << ' ' << i + 1 << ' ' << j + 1 << endl

    because the queries are one indexed.

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

    Got wrecked

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

How to solve F?

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

    First player loses iff for all diagonals of the form $$$i + j = k$$$ have xor-sum equal to 0 (similar to Nim). Proof: if they are not 0, you can make all of them 0 with a single move (and you can't make them 0 if they already are).

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

    Suppose we define two state State 1- All diagonals have XOR equal to 0 State 2- Atleast one diagonal has non-zero XOR There exists a move from state 2 to state 1 and from state 1 a player is forced to move to state 2. So if there exists any diagonal with non-zero xor, then player 1 wins else player 2 wins. Hope you get the idea

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

What was the logic for B?

  • »
    »
    5 days ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it
    Hint
  • »
    »
    5 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Take the right most character of the substring and store it. Look to right if we can find any other character which is equal to it. If yes, then we can make a good subsequence. Else, similarly take the left most character of the substring and store it. Look to the left if we can find any character which is equal to it. If yes, then we can make a good subsequence. Else, the answer will be no.

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

    Let the binStr = 1001101 and query be 2 4

    Then check if there is char 0 (binStr[2]) before index 2 (l) if there is then the answer is "YES"

    On the other side check if there char 1 (binStr[4]) after index 4 (r) then "YES"

    If either of the above conditions is not satisfied then "NO"

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

How to solve C?

  • »
    »
    5 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Hint
»
5 days ago, # |
  Vote: I like it +22 Vote: I do not like it

For me this was a disaster, if cf-predictor is right that was the biggest negative delta I ever got. No need to tell what I think about the problems ;)

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

    All the problems are quite tricky!

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

    It was a weird round, full of ad-hoc problems. Yeah, they aren't that great imo, but these are the sort of rounds that make you feel either great or terrible.

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

    adhoc adhoc adhoc everywhere even people passed D just with some guess. It took me a tough time to prove why that formula is correct but I think CP doesn't reward proofs over guesses same is the case with most of his previous rounds too in almost all of them first 5 problems will be just adhoc or formula. and after that are beyond the scope. Codeforces can be better transformed to adhocforces. I don't see much code in writing formulas. thus This is not code-forces.

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

    E1 was logically much simpler than D IMHO btw

»
5 days ago, # |
  Vote: I like it -26 Vote: I do not like it

the difficulty level of questions in my opinion: D<B<A<C

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

    The problems where all more or less like: Find the key observation and solve easyly, or die.

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

      I'm getting downvoted by those who found the key observation haha.

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

        may be you are wrong . i completed a,b,c under 30 mins and couldnt get any idea about D for rest of 2hrs :(.

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

Am I the only one who thinks D is easier than C?

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

How to solve Z?

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

Problem F is very similar to problem 1149E. (https://codeforces.com/contest/1149/problem/E)

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

How to solve B? It was harder than A and C for me lol

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

    How to solve C? B is about to find if there is a s[l] in the left [0,l-1] or if there is a s[r] in the right [r+1,n-1].

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

    Check my simple solution

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

    I got really frustrated by not being able to solve A and somehow solved B while cursing myself about A , LOL . BTW could someone say the logic behind A ?

    • »
      »
      »
      5 days ago, # ^ |
        Vote: I like it +1 Vote: I do not like it
      • $$$n=1:0$$$ moves.
      • $$$n=2:1$$$ move: $$$2-1=1$$$.
      • $$$n=3:2$$$ moves: $$$3-1=2,2-1=1$$$.
      • $$$n>3$$$ and $$$n$$$ is even:$$$2$$$ moves: $$$n\div \frac{n}{2}=2,2-1=1$$$.
      • $$$n>3$$$ and $$$n$$$ is odd:$$$3$$$ moves:$$$n-1=n-1, n-1 \div \frac{n-1}{2}=2,2-1=1)$$$.
    • »
      »
      »
      5 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Let's consider if the value $$$\geq 4$$$. We know that for all even values, we can easily go to $$$2$$$ then go to $$$1$$$, so we have $$$2$$$ steps overall. For odd values, we can't do better than $$$\text{steps even} + 1 = 2 + 1 = 3$$$. Let's say we can jump to $$$3$$$ in one step (we can't jump into $$$2$$$ since the number is odd), is still takes $$$2$$$ steps into $$$1$$$ and it makes at least $$$3$$$.

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

    If a number is even, it can be made 1 in 2 steps. If a number is odd, make it even, thus 3 steps total. You can get to this logic by thinking that you need to keep dividing a number by its largest proper divisor, and on doing so you can get to the smallest number. In all cases this is 2 since it will give you the largest complement. 1,2,3 are corner cases.

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

    consider string s=111010101000 , consider l=4,r=9 , of course sub-string[l-r] is a sub-sequence of but as per conditions we cannot take the same sub-string , the only way we can find another sub-string is if we can find s[l] before l OR s[r] after r . because constraints are small you can brute-force .

    how to solve C ?

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