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

×

# Help in 2nd problem of lunchtime

 1 Can anyone tell me where this solution for 2nd problem is going wrong? https://www.codechef.com/viewsolution/16374117 p.s.- Its my friend's code and he asked me to debug it after contest but i failed too asked 25 Nov '17, 23:48 1.8k●6●14 accept rate: 22% 0★admin ♦♦ 19.8k●350●498●541

 1 @soham1234. Why are you directly updating on index x%b where you have actually sorted the vector and messed up the data and the actual element may be somewhere else. I may be wrong again. Please verify. answered 25 Nov '17, 23:59 445●6 accept rate: 12% n=1e5 for a particular testcase (26 Nov '17, 00:04) @soham1234 Sorry my problem. Updated answer. (26 Nov '17, 00:15) @aayushkapadia Can you please explain how to solve L-R queries? (26 Nov '17, 00:39) ramini2★
 0 Could Someone Please tell me why this particular solution is giving a wrong answer for the same problem? https://www.codechef.com/viewsolution/16374812 i tried several methods but my answer was never accepted completely.Could Someone tell me the input for which it gives the wrong answer.?? Help of any kind would be highly appreciated. answered 26 Nov '17, 00:53 1 accept rate: 0% Your product in num is overflowing. Use long long. (26 Nov '17, 01:00) avi2244★
 0 Can anyone tell me why my solution is giving wrong answer on subtask #2 but correct answer on subtasks #1 and #3. https://www.codechef.com/viewsolution/16377252 answered 26 Nov '17, 13:26 76●5 accept rate: 0%
 toggle preview community wiki:
Preview

### Follow this question

By Email:

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

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×550
×98

question asked: 25 Nov '17, 23:48

question was seen: 533 times

last updated: 26 Nov '17, 13:26