×

# [closed] MAXCOUNT WA

 0 For the problem MAXCOUNT, the code below gives Wrong answer. Kindly explain the error. asked 31 Mar '14, 15:22 2★sandy999 391●1●16●38 accept rate: 10%

### The question has been closed for the following reason "The question is answered, right answer was accepted" by sandy999 18 Jan '15, 12:55

 2 The suggestion given by @asimali246 is absolutely correct. Check the link of the accepted solution below : http://www.codechef.com/viewsolution/3661615 I have made the three changes to your solution 1st the array size to 10^5+1 , loop upto 10^5 and the last loop upto 10^5 as suggested by @asimali246 . answered 31 Mar '14, 20:35 1.5k●1●10●25 accept rate: 23%
 0 You have created an array(counter) of size 10000, you need to create it of 10000+1=10001 as the inputted number can be 10000 also. Also you need to run your loop till 10000 rather than less than 10000. answered 31 Mar '14, 16:42 141●2●5 accept rate: 40%

By Email:

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:

×21
×2

question asked: 31 Mar '14, 15:22

question was seen: 506 times

last updated: 18 Jan '15, 12:55