You are not logged in. Please login at to post your questions!


Invitation to CodeChef September Long Challenge 2018 sponsored by ShareChat!

Hello CodeChef Community!

We’re excited to announce the September Long Challenge sponsored by ShareChat. Along with the opportunity to boost your ratings and win some cool laddus, there are some exciting full-time job opportunities with ShareChat for professionals across the globe. More details about the job opportunities can be found on the contest page. solaimanope I hope you will join your fellow programmers and enjoy the contest problems. Joining me on the problem setting panel are:

Contest Details:

Time: 7th September 2018 (1500 hrs) to 17th September (1500 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.).

Contest link:

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes: Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: First to solve each problem individually: 100 laddus (For problems common to both Divisions, only one user will get laddus for that problem). (For those who have not yet got their previous winning, please send an email to

Good Luck!
Hope to see you participating!!

This question is marked "community wiki".

asked 06 Sep '18, 23:55

mgch's gravatar image

accept rate: 23%

edited 06 Sep '18, 23:58

Hey guys, so the contest draws to a close.

The editorials for $7$ of the problems are ready. Editorials were quite ahead of the schdule, but sadly there was an unexpected personal problem from $9$ to $14th$ september which messed the schdule up :(. The setter's solution for those $4$ editorials will be released so so yous dont have to wait for official editorials to explore the solutions.

  • Chef and Condition Zero
View Content
  • Selina the Chef's falling on trees
View Content
  • Factoize
View Content
  • Chef and Lost Story
View Content

I apologize for the delay, the required editorials will be put soon. Meanwhile, please enjoy the rest. :)


answered 17 Sep '18, 15:37

vijju123's gravatar image

4★vijju123 ♦♦
accept rate: 18%

edited 17 Sep '18, 15:52

only top 10 will get the laddus???


answered 17 Sep '18, 15:21

vipin_bhardwaj's gravatar image

accept rate: 10%

For the problem STCFOTT, the file for 3rd subtask (Single subtree) is incorrect. It passes the asserts statements I wrote for 2nd subtask (Linear tree). Please fix it.


answered 10 Sep '18, 23:18

abdullah768's gravatar image

accept rate: 17%

Each Selina only changes her direction (from bouncing to falling or vice versa) when she cannot keep moving in the current direction without leaving the tree or hitting another Selina, that is, when one of the following happens:

  1. reaching a leaf when falling
  2. reaching the root when bouncing
  3. meeting another Selina that's moving in the opposite direction

Can someone please explain me the thord condition in STCFOTT problem, preferably with an example.

I am sorry to say but the example for this problem is very poor as it does not explain any of the above conditions. I think the setter or the tester should see to such problems. Disappointed with the codechef team. @admin @mgch


answered 11 Sep '18, 22:57

codebreaker123's gravatar image

accept rate: 10%

Agreed. This problem statement leaves a lot to be desired.

(12 Sep '18, 18:49) meooow ♦6★

Can you please explain the third condition in a way that does not reveal the solution. I am still not able to get it completely. Thanks.

(13 Sep '18, 10:15) codebreaker1234★


(14 Sep '18, 21:17) codebreaker1234★

@codebreaker123 I would like to, but since I am not associated with the problem setting team it is probably not my place to do so.

(15 Sep '18, 21:17) meooow ♦6★

its okay @meooow. Assuming every possible case and submitting accordingly got me an AC. Still I think, if the probelm is not clear the setters should explain the problem with an example. The problem had left too much for us to understand.

(16 Sep '18, 13:44) codebreaker1234★

It seems @mcfx1 has achieved a near perfect score in the challenge problem CHEFZERO and everyone else is being awarded 0 points. Please look into it.


answered 12 Sep '18, 18:59

meooow's gravatar image

6★meooow ♦
accept rate: 48%

Not only near perfect, but perfect score, as all other users are getting exactly zero points, not something like 0.000 something.

@admin, please look into this.

(12 Sep '18, 19:37) taran_14075★

Ironically name of problem CHEFZERO = Chef will give you Zero. xD. Score of @mcfx1 0.000017 pts. His own soln with 0.642936pts fetches him zero. We need a change in scoring fn. And rest of scores are of order 1e9.

(12 Sep '18, 22:23) aryanc4035★

A small change, like (max-min+1) in place of (max-min) will ensure avoidance of non zero score, though there might be some better scoring function.

(12 Sep '18, 23:11) taran_14075★

XD..... relatively his solution's score is 10^9 times less than other's .... there's a lot of optimization he did.... great work by him... XDDDDD

(14 Sep '18, 17:36) l_returns4★

there has been many challenge problem's where bf or random answer fetches 10-50 points but this one is completely reverse of it...

(14 Sep '18, 17:38) l_returns4★

Tie Breaker is a tie breaker only b/w 1st and 2nd ranks xD

(14 Sep '18, 17:44) l_returns4★

No response or action till now, incredible.

(15 Sep '18, 21:21) meooow ♦6★

Seems like they updated it, now people with double digit scores are getting some points. Not big enough to be visible on ranklist page tho.

(16 Sep '18, 01:48) abdullah7685★

I updated the announcement when I came to know of it. Thanks to @mgch :)

(16 Sep '18, 03:27) vijju123 ♦♦4★

@vijju123 how long does it take to rejudge? The scores of old submissions have not been updated yet.

(16 Sep '18, 10:16) abdullah7685★
showing 5 of 10 show all

After scoring fn has been updated.
My submission page shows score of 0.046pts $\approx$ 4.6 point on scoreboard. But it seems scoreboard is not updated. And when I visit Ranking Your Rank: 106 Your Score: 340.00002 is showing which correspond to 0.00002 pts.
Can you please check and remove conflicts.


answered 16 Sep '18, 06:16

aryanc403's gravatar image

accept rate: 10%

Ping. xDDD

(16 Sep '18, 12:23) aryanc4035★

Try submitting the same solution again, that should update it.

(16 Sep '18, 13:19) abdullah7685★

Doesn't help.

(16 Sep '18, 13:24) aryanc4035★

hey one test case is showing tle in TABGAME else all the other test case are passing in time.


answered 17 Sep '18, 00:55

bruceewayne's gravatar image

accept rate: 0%


So ??


(17 Sep '18, 06:28) aryanc4035★

lol I know his comment was silly, but @aryanc403 that was so mean xD

(17 Sep '18, 11:33) pshishod26454★

Why are the Junior Ratings calculated only till SEPT18A?

When will our Junior Ratings get updated?


answered 21 Sep '18, 17:48

arnavvarshney's gravatar image

accept rate: 10%

how many participant are eligible for job opportunities at ShareChat?


answered 21 Sep '18, 23:22

anwar_5256's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 06 Sep '18, 23:55

question was seen: 2,124 times

last updated: 21 Sep '18, 23:22