Invitation to CodeChef January Long Challenge 2019 sponsored By ShareChat

Happy New Year to the CodeChef community!

Celebrate the new year with CodeChef’s January Long Challenge 2019 sponsored by ShareChat. This programming contest lets you tackle 8 problems over 10 days and it’s open to programmers in every country and at every skill level. The contest problem statements will also be available in English, Hindi, Bengali, Russian, Mandarin and Vietnamese.

Participants will also have the opportunity to apply for jobs at ShareChat - India’s fastest growing social network. Visit the contest link for more details.

I hope you will join your fellow programmers and enjoy the contest problems. Joining me on the problem setting panel are:

I hope you will enjoy solving them. Please give your feedback on the problem set in the comments below, after the contest.

Contest Details:

Time: 4th January 2019 (1500 hrs) to 14th January 2019 (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.


Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. First to solve each problem except challenge - 100 laddus. Know more here: (For those who have not yet got their previous winning, please send an email to

Good Luck!
Hope to see you participating!!
Happy Programming !!


Questions are good but not as good as most of the previous long challenge problems. Interactive problems from December long challenge were interesting.


This time Questions are too easy considering for a long challenge. And many questions’s solutions are just few lines that does not match with the word “Long Challenge”.
Also I noticed that there are not different variety of questions in this month’s contest. Please put questions of different different types and topics from next challenge onwards. So that we can enjoy problem solving,thinking and debugging till full 10 days, as in previous long challenge.


Ok, let’s try. Some people complained that CC contests are implementation-only. So, this long challenge was attempt to disprove that claim. In ideas we have not many problems from other topics.

We don’t have a lot of setters and creative ideas for med+ problems. Hopefully, we’ll have some interactive problems in the future.

Maybe it would be good to make some voting about the type of contest. I feel that now we have a lot of problems: slow system, weak tests(if adding systests then there is almost no sense to submit solutions during the contest) cause the system is slow and not allowing to use a lot of TCs, an imbalance of the difficulty(sometimes happens), the lack of creative ideas(especially med+ problems).

Actually there is a good variety of problems in this challenge. You can try lots of advanced techniques on last 4 problems of div1. And first time I saw more than 1000 participants in div1. I’m feeling motivated now :slight_smile:


As no one has answered my query even after asking so many times, now I am posting it here :

Problem Link :

It is mentioned in the problem that : Mark N points A1,A2,A3,…,AN on one ray in this order (A1 is closest to A0).

So does that mean, first comes A0,then A1,then A2 and so on… or I can randomly mark A1,A2,A3,A4,…ETC…wherever I want ?
Can points overlap?

Please clear my doubt guys!! / :frowning:

I assume them to be distinct(can’t overlap) and I also assume that they should be A1,A2,A3 in order(not random)… (Obviously ?)
I wonder how can you mark them randomly…
You are not supposed to ask this query in discuss… you should ask it in comment section below problem statement…

1 Like

I already did that but no-one replied…
Thanks again !:slight_smile:

1 Like

no problem :slight_smile:

1 Like

guys plz help me ???

i got a serious issue i was at rank 38 just 15 min before and my score was 0.482 points and now putted my best code of the ques MATCHIT and got 0.483 points but now rank is 138.

I mean seriously man guys with points 0.482 are having 37 rank and me having 0.483 points is having 138 rank.

i think there is some bug or error in checking process plz fix it asap : (

1 Like

i think score are not being recalculated for the problem MATCHIT

plZ look into this : (

1 Like

very bad of codechef for no reply till now : (
sorry bro but I cant help you in this matter.

Editorials for all problems are ready and shall be available as soon as admin moves them to the public. Hope you all had a nice contest.


This contest was pretty good.I solved 6/8(left the challenge problem + Pizza Slice) …but there is some problem.

My point of view from Div.2–>

All the questions were based on observing some pattern and then writing the code. That’s it.Same was the case in December-Challenge except for “Color-binding Feast” and that graph-based problem.
I am really missing those algorithmic and mathematical problem(s) which ‘Codechef’ used to have in their Long Challenges and then, those were the problem(s) from which we get to learn the most.
For example,





I hope the Chef cooks something delicious this February ! :slight_smile: <3

1 Like

Really? I have to disagree. Last 4 problems: some high school geometry, ad hoc graph theory, sqrt decomposition to squeeze under TLE, again sqrt decomposition to squeeze under TLE.

I agree with @meooow I didn’t solve the last two questions (because sqrt decomposition didn’t strike me :P) and didn’t enjoy solving rest of questions. As a result, I didn’t submit the challenge problem.
On a side note, last two cf rounds had pretty creative tasks.

@meooow In the last task you should use sparse table and in the second last you could add bitsets. But it’s not FFT…

@aryanc403 yes, @wxh010910 rejected almost all med-hard+ problem ideas I accepted & thought to use. Seems the next longs will be easier.

After jan18 I posted this comment almost one year passed and it seems I’m unable to solve these issues… Sorry about that quote. It won’t happens again with nobody

Yes, the last cfs were pretty creative.

1 Like