Why this Solution is wrong (Tennis Tournament)

Why this Solution is wrong
https://www.codechef.com/EXPP2019/problems/EXUNB

https://www.codechef.com/viewsolution/27256156
@ shashwatchandr

Input:

1
5

Your Output:

YES
11000
00011
01100
10001
00110

This result implies that player 3 win against player 3
Which is WA…
So improve your code for this aspect…