WA on submission (AVERAGE)

why is this code giving the WA when i submit it even though it works fine for all sample cases

https://www.codechef.com/viewsolution/28368283

Consider the testcase:

4                 
4
4
4
4
1 Like

it works fine

you have to count the no of avg. elements and not distinct pairs(i,j) for which an avg element exists.

1 Like

If you say so :slight_smile:

ok thanks for the help