问题描述:
求一个acm题的算法
Problem A:Is it possible?
Skywind does not excel at the sports,but he like sports news,for example,the news of Chinese soccer super league.It is all known that in soccer competition,if A win B,A win get 3 points and B get zero,both get 1 point if tie.When he is busy with the ACM contest these days,he missed the most recent news.Karen,one of his student,told him the lastest points of every club teams.Karen said:"Team A:3 matches,9 points; Team B:3 matches,3 points; Team C:2 matches,1 points;" (assume only three teams)."It is NOT possible",skywind told karen.
Can you find out the reason?The summary point of these teams is more than 3*4; Maybe other mistakes can be found also.
Can you judge whether the point list is possible or not?
Input
The first line of each case is a integer n (n
Problem A:Is it possible?
Skywind does not excel at the sports,but he like sports news,for example,the news of Chinese soccer super league.It is all known that in soccer competition,if A win B,A win get 3 points and B get zero,both get 1 point if tie.When he is busy with the ACM contest these days,he missed the most recent news.Karen,one of his student,told him the lastest points of every club teams.Karen said:"Team A:3 matches,9 points; Team B:3 matches,3 points; Team C:2 matches,1 points;" (assume only three teams)."It is NOT possible",skywind told karen.
Can you find out the reason?The summary point of these teams is more than 3*4; Maybe other mistakes can be found also.
Can you judge whether the point list is possible or not?
Input
The first line of each case is a integer n (n
问题解答:
我来补答展开全文阅读