# Given a situation, and some conditions, verify is that situation is possible

Well it's a problem me and my friend had thought of, and well, haven't come up with anything to solve the following problem(I'll try to phrase it in the best way I can):

Given that there are `n` number of teams, and the number of matches each team has played, and that no team can play more than 2 matches with any other team, predict if the distribution of matches played by each team is possible.

P.S. : I am a Python Programmer, so (if possible) post only python code for explaining..

-
What tournament format? Single elimination, double elimination, Round Robin? – John R. Strohm May 4 '13 at 15:55
@JohnR.Strohm Round-Robin if you notice, the conditions are like that of IPL – pradyunsg May 4 '13 at 15:58
The input is only the number of games played by each team? No info about the opponent? Is there any condition about the teams having to play all at a certain time simultaneously (like on Saturdays)? – Thomas May 4 '13 at 17:47
@Thomas Yes, only 1 input. No info. No, in fact I was also thinking that if the combination is possible, generating a schedule for 1 match a day could be possible, but that's for my next question.. – pradyunsg May 4 '13 at 18:10

We don't know how many matches a team has won/lost/drawn, and we don't care about it, it is just that the team has played `x` matches.. || Given the number of matches each team has played, determine if that combination is possible.. || – pradyunsg May 4 '13 at 18:08