Ashishgup's blog

By Ashishgup, history, 4 years ago, In English

We invite you to participate in CodeChef’s CodeChef’s February Lunchtime on 27th February from 7:30 PM — 10:30 PM IST.

There will be 7 problems in Division 3 and 6 problems in Division 2/1.

CodeChef is happy to announce Codenation Innovation Labs (CNIL) as a recruiter for February Lunchtime 2021. CNIL is hiring programmers for the Software Development Engineer role and its Junior Trilogy University (Intern Programme). Programmers from India and across the globe are invited by Codenation Innovation Labs to apply for opportunities at its organization.

Joining us on the problem setting panel are:

Problem Submission: If you have original problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here.

Prizes: Top 10 Indian and top 10 Global school students from ranklist will receive certificates and CodeChef laddus, with which they can claim cool CodeChef goodies. Know more here.

The video editorials of the problems will be available on our YouTube Channel as soon as the contest ends. Subscribe to get notifications about our new editorials.

Admin Note: Special thanks to Um_nik for his help and for suggesting better solutions for the harder problems.

Good luck and have fun!

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

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

As a setter i post the

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

Is it rated?

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

    No one know the FUTURE !!!

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

    WTH if lunchtime is rescheduled and problems will be available after 7:50 pm (IST) then how they are visible on 7:44 PM or before I don't know :(

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

    Not anymore I guess. They wrote "starts in 15mins" but displayed problems before that.

    That should be enough to make it unrated.

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

Hope, This time Codechef server survives.

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

    the issues survived :sad:

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

    I think Codechef should hire some good engineers, because it seems to me that the current one are not able to solve this server problem since a long time.

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

      This happens when u recruit guys based on long challenge ratings xD

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

My friend Rehan's submission hasn't been judged for 11 minutes. How do we know if this will not happen in the contest?

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

Where's the tasks?

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

Problems nahi dekh rahi

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

I couldn't see the problems!!!!!!!!

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

Is this a new trick by codechef? No problem == No server overload?

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

Anyone else unable to see the problems

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

Not Again!!!

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

With 0 problems to solve. Congrats we all are first now. +120 everyone.

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

Did the forget to upload the tasks lmao

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

Not able to see problems...

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

    What was point of all those testing rounds? Even rated div3 rounds they had.

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

Its blank.

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

disappointed again!

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

bhai inke server phir hug die...

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

CodeChef again facing issues, even after testing round

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

Here we go again...

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

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

dude no problem?

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

Aur pio faizalwa ka ganja (You should stop taking weed ) .

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

why i can't find problems??

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

Lol...now the discuss is also crashed :/

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

I am actually making a video on this contest and this is getting slightly annoying to my future viewers that the problems aren't visible :)

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

    We would be able to see you adding this comment in that video?

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

      (EDIT: I added it to the main video, and for the first 15 minutes, I'm reading the hilarious comments to this blog)

      In a separate blooper video that's still going on since the contest just got delayed...

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

    problem setter is JOHN CENAA!!!

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

This is the nth consecutive contest with some issue or other.

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

It is funny, how everyone is discussing codechef problems on codeforces forum, because there isn't one on codechef, or if there is, it isn't worth discussing there

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

Stop complaining everyone. Codechef clearly said that there won't be any problems in future contests.

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

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

Atleast give some announcement -_-

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

Damnn!!!! They resolved all the problems of their server by removing the problems itself!

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

So many F5's :(

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

Codechef preparing Div1 contest:
Everyone comments:Ah shit here we go again

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

Did anyone send queries to [email protected] ???

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

I submitted a problem on CC

It took so much time and in the end I got Internal Server error. This may happen in contest also! A big F for codechef

Screenshot of the proof

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

Bruhh!! Not again..

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

Its time for Ashishgup to resign

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

Baler Codechef.

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

Server down. Quite surprising (and disappointing) after the previous break-the-server contests.

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

They should at least make an official announcement in such cases.

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

Thanks codechef. The contest is going smooth. There are no problems.

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

Round has been delayed to 7:50 IST

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

ha ha, contest delayed after starting it once.

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

I found a statement from inputting the code(from the standings)... After that, the contest was postponed...

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

    ahh some contest parsers just might break the contest then D:

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

    does that give some ,an unfair advantage, meaning the round becoming unrated?

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

    In my case, I swear that the statement of the task(SMOL) I could see isn't scoreable for me.

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

11 mins Delay

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

Problems will be available in 10 mins 57 secs

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

Lunchtime is rescheduled (19:50PM — 22:50PM IST)

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

CodeNation will give an interview call to all the users because all have 1st rank.

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

This is kinda unfair:

Although contest is delayed problems were visible for some time.

For example with links like: https://www.codechef.com/LTIME93B/problems/DIV03 (Problem names were public in rank-list)

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

Will it be rated?

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

Guess the problem by problem name

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

Contest Started or still LUNCHTIME there?

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

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

Please add John Cena in the setters list.

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

Basically its time for codechef to create a new site from start and go for AWS for servers.

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

    How come they even earn money from so many online courses they teach and still they aren't able to maintain servers? Codeforces is a non-profit and yet manages load much better compared to them

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

how some of the problems are still visible

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

Problems are back. Hurry

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

Why has it started randomly after saying about a 5 Minute longer delay!!! Why so unprofessional!!

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

Man, I really want to participate(and hopefully do well) in codechef contests. But mishaps like these just leave a bad taste in my mouth.

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

Lol It started suddenly with 17 mins passed

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

Anyone unable to submit. It is saying for me that you are allowed to make only 1 submission per 25 seconds but in the MY SUBMISSIONS does not show any submission being made

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

You are allowed to make 1 submissions in 240 seconds on codechef. I mean why?????

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

    because the server will overload if you make too many submission lol

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

uh oh Lol — the server isn't even allowing me to submit.

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

See the problem number b. Example case 3: The string "xyxyxy" is already a Palpal string, since it can divided into "xyx" and "yxy".

they said each character should belong to exactly one substring. but this is contradictory for this example that they had shown. i'm stucked with this one.

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

    I got ac right now. but, The problem description is wrong in my opinion. they said : ~~~~~ A string is called a Palpal string if it can be divided into contiguous substrings such that:

    Each character of the whole string belongs to exactly one substring.
    Each of these substrings is a palindrome with length greater than 1

    . ~~~~~ see first condition and how you gonna relate this thing

    xyxyxy
    
    xyx yxy
    

    x and y are on different substring. Ashishgup

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

      hey what's your problem? If you think i'm wrong then say it. its clearly mentioned "Each character of the whole string belongs to exactly one sub string." But watch the third example

      xyxyxy
      xyx yxy
      

      clearly xyx and yxy are different sub string. xyxyxy has two characters 'x' and 'y', and both of them belongs to two different sub string which is contradictory.

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

        You should try asking in comment section of problem (though i don't know how fast they reply).

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

          I asked the same doubt in comment section .They replied quickly(in around 5 minutes).

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

        The problem statement actually means that "Each character(i.e each element) of the whole string belongs to exactly one sub string."

        Here characters at different indexes are considered different.

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

In problem Sed Max , I solved by finding left maximum and right maximum for each index (so that i can traverse through second maximum faster) , I break from the loop when i found second maximum greater or equal to a[i].

It passed (submission) the test cases , but how to prove that it won't be quadratic in worse case ? Also i noticed that answer is always around $$$O(n)$$$ .

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

    Hi,how did you solve average sort?

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

      If there exists index $$$i$$$ such that a[i]>a[i-1] then answer will exist else not .

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

    We just need to find next greater/equal and previous greater/equal for every index and just keep adding the difference in a set.my_sub

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

    Same question, I also did the same thing of traversing every time, and breaking when found.

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

How to solve Independent Set? I wasted 1 hour on it.

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

    The adjacency list of all elements in A will be the same, because all of them are connected to all elements of B and not among themselves.

    Using this, you can directly group all vertices having the same adjacency list and check if the condition is satisfied for a particular group or not.

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

Since the contest is over now so I think, I can ask my query. What is wrong with this code?

PALPALS

code

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

It's easy to implement both tasks INDEP and SOLDIERS, with Zobrist Hashing.

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

SOLDIERS was nice. I don't know if the intended solution involved randomization but here's mine:

For each index $$$i$$$, define set $$$S_{i}$$$ which is defined as:

$$$ j \in S_{i} \text{ if and only if } L_j \leq i \leq R_j $$$

Now, for $$$i$$$, if $$$S_i = \varnothing$$$, set $$$a_i = 1$$$ if $$$p=0$$$ or $$$a_i=N$$$ if $$$p=1$$$.

For all other $$$i$$$, gather all $$$i$$$ with identical $$$S_i$$$ and permute them optimally. For checking this, represent each set as a hash (xor of all $$$f_j$$$ where $$$j \in S_i$$$ and $$$f_j$$$ is randomly generated). To compute this fast, use some data structure like lazy segment tree or difference array.

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

Lol. This guy uploaded solution during the contest on youtube, in order to lure people to his telegram group for solution.

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

@Ashishgup take note

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

Your text to link here...what is this Ashishgup you reject problems by telling them its too standard and now see what your friends are doing just cheating the problems from GFG.what is your say now ,let me tell you what you will say "My friend got this idea and i was not aware at all that this problem was already there on GFG".please consider the problems submitted by other people also at Ashishgup since you are an admin so please show some courtsey for other people also not only to your friends.

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

    this is not the first time see all the problems are mostly shit . what was point in having obvious testcase of length 1 string in 2nd problem of Div2 Palpal.

    This type of shit is not expexted!

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

    https://codeforces.me/contest/280/problem/B

    This 8 years old CF problem also has the essentially same idea. Exactly same in fact.

    The interesting thing here is — Ashishgup has already solved this problem in 2018. Link to his submission

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

    Why wasn't Um_nik involved as an admin? Has he left codechef? He probably would have rejected this problem. Also, I really liked the December lunchtime when he was the admin. There were so many subtasks in most problems and every subtask was sensible.

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

      The question is not that simple... I'm not sure how much I can tell right now. CodeChef is trying to work on quality of problems, I am a part of that process, we are going to change how proposing problems works and I hope that I will be able to tell more once we decide on all the details.

      About this problem: I have discussed it and I liked it. Sorry that we didn't notice that it was available on the net.

      About problems in December lunchtime: Thanks a lot, but that's not my deed exactly, most of the effort comes from authors.

      About subtasks: As you may remember, December lunchtime had awful queue issues, so we made a decision to reduce the number of subtasks for now, until we can increase judging capabilities.

      About Ashish and his friends (I know that's not in this comment, but the thread started from it): I'm against it and told so to Ashish, but I get the appeal. We are on a tight schedule, and using problems from authors about whom you sure that they will be able to prepare the problem in short time is really nice. I understand that it's not fair to people who have to wait months, and I'll try to get this fixed when I'll get the chance.

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

    Hey there, I'm the problemsetter for SEDMAX. It was totally a mistake on my part that I didn't check if a similar problem existed beforehand.

    However you shouldn't blame Ashishgup for this. He's been trying his best to improve contests at CodeChef. And it's not like he gives a pass to every problem suggested by his friends, most of the problems suggested are rejected by him.

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

      I think it was a bit careless on his part (especially because he has already solved a problem on CF which uses the exactly same idea).

      While I'm NOT SAYING that he did it intentionally, but usually when you have solved a problem, you should remember that and such a mistake should be avoided.

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

        I have solved 3000+ problems on CF itself as you can see on my profile, so I obviously don't remember even a fraction of the problems I have solved.

        I consulted with Um_nik as well regarding the problem.

        The GFG was an oversight because we could have tried Googling in various ways, but CF problem — I don't think I or anyone can find that unless the problem is on our mind, which is very unreasonable to expect.

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

      We can't believe the innocence shown by you anyone can google this problem easily just a matter of getting meaning of the problem same thing must have been done by admins. especially when you get 50 to 80 $ per problem.

      Why MY true comments are getting deleted is it due to less contribution and more downvotes. but seriously satire is genuine in my comments.

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

        I don't have any way to prove my innocence (neither do I think anybody would have a way in my situation).

        You can check my past problems and see that they are original.

        Mistakes happen dude. I made one, and I apologised for it. I have no intention to argue with you if you're hellbent on blaming me.

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

          It was a good problem. Ashishgup and you explained yourself well already. So please don't worry about it anymore. Just remember:

          Haters gonna hate potatoes gonna potate.

          Have a good day gentlemen!

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

      if it is so bhvdsi that your many problems are rejected can you please show the screenshot of mails of the thread of problemsetting submission where your problems are rejected,I know you will not show because being a true friend of Ashishgup you never have to mail those problems and wait in a queue for long time.