Here is my code :

```
[1]
I have got 60 pts. Actually, for n>3 I rotated the array until and unless there is an answer for that array. For n==3 i took care for that and same for n==2 and n==1. But the problem was with n==4 where there were 3 distinct elements. Please help me with this.
[1]: https://www.codechef.com/viewsolution/16506856
```