Ashishgup's blog

By Ashishgup, 3 years ago, In English

We invite you to participate in CodeChef’s January Lunchtime on 30th January from 9:00 PM to 12:00 AM IST. Note the unusual time.

There will be 3 divisions, each division containing 6 problems!

This Lunchtime, ByteDance is joining CodeChef as the official contest recruiter! The tech giants, who have their presence globally established through a range of content platforms, are looking to hire for multiple positions for their Singapore office, including — Algorithm Engineers, Backend Engineers, Data Engineers, Data Scientist, Machine Learning Engineers, Research Scientists, Frontend Engineers, Quality Assurance Engineer, Research Engineers, Software Engineer, and Site Reliability Engineers.

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: The following will receive CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here:

  • Top 10 Indian and Global Users (Overall)
  • Top 10 Indian and Global School Students

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:

This Lunchtime is a replay of Codeflows, so most problems do not have subtasks. We have added some easier problems for Div3 and Div2 problemsets, and the contest is delayed from its usual time to avoid clash with the final round!

Good luck and have fun!

Update:

Congratulation to the Codeflows onsite winners:

  1. Petr (900/900 points — only one to solve all problems)
  2. kabuszki (810/900 points)
  3. bicsi (800/900 points)

Update 2:

The January Lunchtime is being made unrated due to the various issues that users faced.

With the high traffic that we have been getting recently, we have been facing issues with our infrastructure, and the contest experience has been bad. Keeping this in mind, we are postponing all rated short contests, till a time when we are sure that the contests can be held smoothly, and we've had a smooth testing round. In particular, the Starters contest scheduled for 31st January is being postponed indefinitely, till further announcements. Apologies for the inconvenience.

Note: The February Long Challenge will take place as usual.

  • Vote: I like it
  • -39
  • Vote: I do not like it

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

The top 10 Indian and top 10 Global participants will receive CodeChef laddus

Not all participants but only school students because it's a LT, or this time is an exception?

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

    It will be given to both as an exception :D

    • Top 10 users (Indian and Global)
    • Top 10 school students (Indian and Global)
»
3 years ago, # |
  Vote: I like it +29 Vote: I do not like it

Can we expect another server issues?

Because It was very irritating that happened last time

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

    Hopefully it's better this time, CodeChef now has more servers to handle the traffic.

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

      The story of every Codechef contest : click

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

        Last CookOff worked smoothly for the last 2 hours, hopefully this LTIME issue is resolved soon as well. I'm sorry, I can't really help with the server related issues :(

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

          Well I don't know about the actual statistics of how many people started the contest versus how many people were still doing it in the last 2 hours. But it definitely wasn't the full audience that started the contest. So the claim that the server worked fine for the last 2 hours is telling the half truth.

          Also, I do understand that you cannot do anything about it except ask the Codechef team to fix their issues.

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

            On top of that, they make last contest rated despite knowing the fact that many of the participants leave the contest midway due to server issues

            Please take some time to resolve this issue..This is really frustrating : (

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

No subtasks :(

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

    Some problems will have subtasks, but yes, most of them do not have it.

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

Thank you Ashishgup!

For some reason, my rating only goes up in most of your contests. I REALLY hope that trend continues as I was destroyed in last 2 contests here.

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

Please try to keep the usual timings for future lunchtime contests.

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

Why unusual time?

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

    As mentioned in the blog, it was to avoid the clash with Codeflows Finals which ended at 8:30PM IST.

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

What does "replay of Codeflows" means? The problems will be same as Codeflows?

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

    Some problems are shared, some are exclusive to LTIME — but yes, most of the harder problems are same as Codeflows.

»
3 years ago, # |
Rev. 2   Vote: I like it +14 Vote: I do not like it
 ByteDance is joining CodeChef as the official contest recruiter!

This line is definitely not for Indians as they recently fired hundreds of Indian employees aside from that Thank you for the quality and quantity of problems :)

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

Reminder: Contest starts in 5 minutes.

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

I think server are down again .Problems are not loading

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

Here we Go again

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

I can't submit lol

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

Long Queue again :(

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

Cannot submit due to error . Waiting from 4 minutes.

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

server started crashing wow!!

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

Codechef, raise funds like codeforces. We will be happy to donate, but please improve your servers. My solution is running for the last 15 minutes.

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

Such a time waste to participate in Codechef Contests nowadays.

»
3 years ago, # |
  Vote: I like it -9 Vote: I do not like it

bruh

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

Leave Codechef!!!

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

Maybe this happens because the easy problems are way too easy and a lot of people submit

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

:(

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

Its common for codechef these days to hold contest just to disappoint people

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

Bro how many server codechef have ?

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

    same as number of living dinosaur in 20th century

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

Another one bites the dust.

sigh this is really the fourth time in a row :|

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

You are allowed to make 1 submissions in 25 seconds on CodeChef..

Waiting from past 15 minutes to submit.Are these servers hosted on heroku app?

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

.

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

    The contest is ongoing, whether the codechef servers are crap or not, i don't think you should be posting your questions here which could compromise the integrity of the contest.

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

      I apologize, I simply didn't knew where to ask it. I didn't feel like a question like this could reveal anything. But if it's anyway a problem I will try to remove it.

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

        Ask the questions of the running contest in the comment section below the problem, if it is a valid query than the setters will definitely answer.

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

    At the bottom of the problem page there is a section of comments, you can ask there.

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

When submitting a solution is harder than solving the problem.

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

my submission is on queue since hour.

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

    I don't think there is any queue issue (2-3 mins atmax?) — can you link your submission?

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

    I don't think so...three solution got accepted in less than an hour.

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

Has website stopped loading ? In my case i am not able to load the website itself currently .

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

I am trying to submit a solution but as soon as I go to sumit page it is not allowiung me to select the language. Please help Ashishgup

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

    I'll ask the CodeChef team to check

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

    I thought that I spam submit a lot so they remove the laguage selection to not let me submit again LMAO :))

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

Ashishgup I think problem statement of Shifting Spoons DIV2 wrong https://www.codechef.com/LTIME92B/problems/SHSPOONS .

In Output section it's written $$$p ≠ n$$$ whereas in problem description its written $$$p ≠ q$$$ . So is both constraint correct ?

Please clarify .

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

20min queue for problem D

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

    click My submission -> Then click -> view on your queued submission. Hope you can able to see the verdict.

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

Waiting for judging from 20 mins :(

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

503 for submit page 4 mins before the end! Really?

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

    I got the page 1 mins before the end, submitted and ... 405 Not Allowed :)

    EDIT: adding to that, that for CARPD I still have running for 23 mins ago.

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

    Middle click submit 10 times, it'll open 10 tabs out of which atleast 1 will work. This is what i do

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

People here complain to Ashishgup as if he is the owner of Codechef :D

Chill please. Guy is doing God's work if you ask me.

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

Why people always talk about making a round unrated. TO prepare and test a round, honestly lots of effort required. And server issue was same for all. Hence why u guys ask for unrated contest. Pay at least a minimum tribute to the setters. Its really horrible for those who set the problems. But if you loss rating today a bit, u might get it back tomorrow.

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

    If the contests are held like this then I am not sure when will I get it back.

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

I will be getting positive delta in this contest but then also i think it should be unrated .

The thing is if you don't make unrated these contests and suppose codechef like every year holds icpc and does the same shit then what will happen ?

Please Ashishgup consider this seriously . No reason to offend you but codechef is really really bad.

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

    It's unrated — and all short contests on CodeChef are postponed indefinitely until the issues are resolved

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

First four problems of Div2 were very trivial and completely non-interesting, especially considering the length of 3 hours. Personally, I feel like the difficulty should have been much higher, especially considering that 1st, 2nd and 3rd question barely hit easy D2B here on CF. The last two problems were interesting, but the server issues are gross.

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

    I took half an hour to prove my claim for Division 2-D, and did not find it trivial at the very least after having solved it. Could you share me your approach for this problem?

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

    Hmm, "completely non-interesting" is very subjective, I'm not sure if you're trying to say that your point is objectively correct. I proposed problem 4 (DREDIV) to a few people, and of the 5 people around 2-3 thought it was interesting and the rest thought it was boring. So I don't think it's easy to decide if a task is interesting or not in general. (It's obvious in some special cases, sure, but those are mostly copied problems, and I do think the problem is original)

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

I like the idea of F, so thanks to the author.

It was unfortunate that my solution has a worse complexity or bad constant factor and I had to constant-optimize the solution, without the knowledge of how fast my code runs on Codechef servers. My latest submission runs in 1.3s in the worst case on my computer. Hope it'll pass after getting evaluated.

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

    Can you describe your solution ?

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

      When you add the $$$i$$$-th student, the expected increase of the score is $$$(i-1)/g$$$. After some calculations (I'll omit the detail because that's complicated), it turns out we need the first $$$O(N)$$$ terms of the FPS of the $$$\sum_{1 \leq k \leq N} \prod_{1 \leq i \leq k} x/(i-(i-1)x)$$$. We can do this by FFT and D&C, and the total complexity is $$$O(N\log ^2N)$$$.

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

First time able to solve all 6 problems of Div2. Thanks to Codechef and Ashishgup for nice problem set, really enjoyed the contest.

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

Lol, my verdict came as internal server error: link

This is the same code i submitted after the contest: link

Ashishgup can you have a look at this, the submission was during contest period only.

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

    Yes, there was some issue with the judge today — occasional submissions got Internal Server Error. We'll look into resolving it before the next contest. Today's contest is unrated.

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

Why are you guys making it unrated? I wasted my 3 hours. If you could make cook-off rated, then why not this?

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

    CookOff had site issues at the beginning — Lunchtime also had queue issues (30+ minutes at the very end) and issues regarding some Div3 participants not being able to submit their code. It sucks, but hopefully, it does not happen again in the future.

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

      At least, you can make it rated for div 1. Although, I had bad experiences is both cook-off and lunch time, but my experience in lunch time was still better than cook-off and I believe div 1 participants are not much affected. Rest is your decision.

      CodeChef_admin

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

    Agreed, this is disappointing. It's the same for everyone. I admit I am biased as I had a good contest was hopefully on track to go up to Div 1. It seems that server issues are commonplace on Code Chef — are all contests going to be unrated until this is resolved? I'm not convinced this is the answer.

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

      No, CodeChef is not going to have a rated contest till the issues are resolved and a testing round is held. So yeah, hopefully, it will be resolved the next time a short contest is held.

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

        Ok, fair enough. Good luck sorting the issues out. I'm sure lots of people are complaining, but hosting contests for others is good and requires a lot of effort, so thanks and I hope you can resolve the server problems.

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

First time I was able to solve 5 problems in div 2 and contest is made unrated :(

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

    Could you share your approach for Div 2 E?

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

      If we can find two divisors of k such that both are less than equal to n then answer is yes else no.

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

As a 6-star(2478), where is my 7th star...? (It seems that there are only few troubles in Div1...)

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

    +5-CC4-D9-B3-6-BCF-452-F-B6-B2-E3-C771-F2-D966

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

    We positive deltas may be biased, but in div1 I didnt face much trouble with queue tbh (2-5 mins queue time on each submission)

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

      True that, but in my experience, I encountered many errors while submitting and each time it took like 5-7min to submit the code.

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

        Errors weren't an issue for me, I'd just open like 5 submit tabs at once and atleast one of them would work and I'd be able to submit

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

      Yes Ashishgup in div1 we didn't faced much problems.

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

    Is there any outside chance for Div 1 being rated? Given that we really didn't face much issues atleast in div 1.

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

Just a friendly suggestion upcoming. In one of the questions in today's contest, YES/NO was expected as output and in another one, Yes/No was expected. Well, it's kind of confusing I suggest you keep it case insensitive if possible or be consistent in the output of all questions of this form in further rounds.

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

    We will be adding a case-insensitive checker to the default judges soon, so it should not be an issue.

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

      January cookoff was worse than this yet it is was rated. Please either make both rated or both unrated.

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

    I got wa due to this.

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

Can anyone share their approach for the fifth problem of the second division?

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

    Consider if you have 2 good points, P (x0, y0) and Q (x1, y1). Then P is the max of column y0 and the min of row x0, while Q is the max of column y1 and the min of row y1. Let's think about the points A (x0, y1) and B (x1, y0). We know that P >= B and P <= A. We also know that Q >= A and Q <= B. So we must have A = B = P = Q, otherwise some inequality doesn't hold. This means that the total number of points which are good must be the size of a rectangle in the grid.

    Therefore X must be the size of some rectangle in the grid, so it must be the product of 2 numbers between 1 and N.

    Solution: find factor pairs of X. If there is a pair such that both are between 1 and N, X is reachable, otherwise it is not.

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

Other things aside, I just want to appreciate the hard-work that Ashishgup and others put in to prepare these contests. I feel that it takes a lot of effort, and it goes unnoticed and gets buried below the shortcomings.

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

Well, 13 was really unlucky for me

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

Anyway, there are still some judgement failed verdicts and they should be rejudged. I cannot know the correct ranklist...

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

Will we still receive our Laddus?

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

I think if the admin Ashishgup tried to increase the time limit for 20-30 minutes more then it would we fairly possible to have a rated lunchtime :(

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

Is editorial published?

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

Video editorials for 8 problems have been uploaded here. And the editorials will be published soon.