why is this code giving the WA when i submit it even though it works fine for all sample cases
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 
ok thanks for the help