I was trying to solve this problem: https://mirror.codeforces.com/contest/1487/problem/C and i came up with a wrong solution that i changed, now i know this modified solution works but its based on some assumptions that are:
- if n%2 = 0, then the optimal way is to tie a match between two teams such that each of them has no ties yet. And there is a way to get score = 0, in a way such that we make a team lose (n)/2-1 times and win (n)/2-1 times and 1 tie(assigned previously), also if this team has won/lost a match with any other team, we keep that in mind. So, we fill the grid of size n * n, such that each row(representing a team's matches has sum = 0), one thing that i need prove with is that once i have filled more than n/2 rows its possible to fill remaining such that their sum if 0, and only using -1/0/1 representing lose/tie/win.
- else, the optimal way is to have no ties and make each team lose (n-1)/2 times and win (n-1)/2 times. Here, i needed proof with :- Once I have filled more than n/2 rows, its possible to fill remaining with sum = 0 using only -1/0/1 representing lose/win/tie.



