Invitation to CodeChef October Lunchtime 2019

Greetings CodeChef community!

I would like to invite you to participate in CodeChef October Lunchtime 2019. This is a 3-hour contest and everyone is welcome to participate and test their coding skills. And the problems are available in English, Hindi, Bengali, Russian, Mandarin and Vietnamese.

If you have any original and engaging problem ideas, and you’re interested in them being used in the CodeChef’s contests, you can share them here:

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

-Setter and Editorialist: jafarbadour (Jafar Badour)
-Tester: teja349 (Teja Vardhan Reddy)

  • Statement Verifier: xellos0 (Jakub Safin)
  • Mandarin Translator: stzgd (Gedi Zheng)
  • Vietnamese Translator: songuku95 (Team VNOI)
  • Russian Translator: gomelfk (Fedor Korobeinikov)
  • Bengali Translator: solaimanope (Mohammad Solaiman)
  • Hindi Translator: devils_code (Akash Srivastava)

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: 26th October 2019 (1930 hrs) to 26th October 2019 (2230 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 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: How do I win a CodeChef Goodie?.

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


I hope I reach 3 stars after this contest :smiley:

1 Like

maximum rating that can be obtained in a single contest is fixed so thats not possible.

but in a few contest you will be 6-7 star easily

1 Like

Author’s solution seems incorrect ( I am 99.99% sure) for Kth Numbers.
No one is replying to comments about this issue. :frowning:
@jafarbadour @teja349 @kingofnumbers @kal013
Can anyone find any issue in this solution ?
Edit :
Added comment 2.5 hours ago (8:29 pm) about this issue. Still no reply.
So I assume contest won’t be unrated and problem will be correct.
Please help me in finding bug.


Is the subtask 1 of Kth numbers correct ?


All getting WA in subtask 1 and AC in subtask 2 still admin be like
“We are correct”. What a confidence !! :expressionless: :clap:


First subtask seems wrong for kth numbers. My code gives WA if i exit before reading n for 10th testcase and gives SIGABRT if i read n for 10th case?


Yet again wrong tcs warning ft. @aryanc403 @kingofnumbers

You should stop organising contests if you cant create proper test cases and you need time during contest to create problems.

My soln passed larger testcases but gave WA on smaller one. I’m preety sure my soln is correct.


Maybe the same thing is happening with me here :

The interesting part is what gone wrong after i changed it to this :

Can anyone help me understand ?

1 Like

Can anybody tell me what’s wrong with this solution for first subtask? I’ve stress-tested with another one that got it and found no wrong case.

1 Like

My solution uses naive multiplication on smaller testcases and passes. Most probably there would be a bug in your code.

tagging yourself ? XD \hspace{0mm}

Mine is simple brute force. :pensive:

Be assured no implementation bugs here.

My soln also used O(n*n) but it never passed smaller test case. Later I add fft and it passed 2nd test case.


F_i=\sum_{j=i}^{j=n} C^{j-1}_{i-1} A_j 2^{n-j} is my answer.


Same here. I did brute force for this formula.

1 Like

Seems nobody has full score on this problem after rejudging.

I kept getting WA on the small test case. In fact, I tried asserts and it seems that there is an issue with test cases. I tried A_i\ge -10^9 and it gave SIGABRT!

1 Like

Did anyone get the first subtask right ?

I did but author didnt get it right hence he marked my soln WA.


Same happened to me, I think. I don’t know FFT and other stuff but, this O(n*n) solution should pass the first test case. Isn’t it?

1 Like