count of maximum

why code chef is giving wrong answer for my code… while it is giving correct answer on my compiler.
please check my code once. http://www.codechef.com/viewsolution/4261658

You are avoiding the cases in which there is no repetition of any element.

Ex :

1
1

4
1 2 3 4
1 Like

As I pointed out in your previous problem ( TSORT) , you should use here a freq[] array to store the frequency of elements since range of elements is small. Then scan the freq[] array and record the maximum frequency and element. I hope you have solved TSORT and you could relate to that problem.

1 Like

yes because we have to consider only those digits which are repeating
not the non-repeating ones.

hey still i am getting wrong answer…please check i have modified my code…http://www.codechef.com/viewsolution/4291450

i have modified my code please check once. its still giving me wrong answer…but i am getting correct on my compiler…here is my code
http://www.codechef.com/viewsolution/4291450

SORRY I GOT IT…I GOT IT WHERE I WAS DOING MISTAKE…

1 Like

SORRY I GOT IT…I GOT IT WHERE I WAS DOING MISTAKE…