{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e足球是世界上最伟大的运动之一。许多人喜欢踢足球。在一个赛季的比赛之后,负责人必须计算每个球队的最终得分。他太懒了,不想计算,所以他请你为他写一个程序来解决这个问题。\u003cbr\u003e\u003cbr\u003e以下是规则:\u003cbr\u003e1. 每个球队都必须与所有其他球队比赛。\u003cbr\u003e2. 每两个球队必须进行两次比赛,一次主场比赛,一次客场比赛。\u003cbr\u003e3. 在一场比赛中,获胜者将获得3分,失败者将获得0分。如果是平局,两者都将获得1分。\u003cbr\u003e\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"输入包括许多测试用例。在每种情况下,第一行将有一个数字N,表示球队的数量。接下来是N * (N – 1)行。每行代表两支球队之间的比赛。格式为:\"Team1 VS Team2 p:q\",p代表Team1进球数,q代表Team2进球数。p和q都不大于9。\u003cbr\u003e\u003cbr\u003e处理到文件结束。\u003cbr\u003e"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例,按降序输出球队及其得分。每行一个球队,格式为:\"TeamX scores\"。如果两支球队得分相同,则净胜球较高的球队将领先,净胜球指的是球队进球总数与失球总数的差。例如:如果一支球队进了30个球,失去了40个球,那么净胜球为30 – 40 \u003d -10。如果两支球队得分和净胜球相同,则进球数较大的球队将领先。如果两支球队得分和净胜球相同,并且进球数也相同,则按字母顺序输出。\u003cbr\u003e\u003cbr\u003e在每个测试用例后输出一个空行。\u003cbr\u003e"}},{"title":"样例","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\nManchester VS Portsmouth 3:0\r\nLiverpool VS Manchester 1:1\r\nLiverpool VS Portsmouth 0:0\r\nPortsmouth VS Manchester 1:1\r\nManchester VS Liverpool 2:1\r\nLiverpool VS Portsmouth 1:2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eManchester 8\r\nPortsmouth 5\r\nLiverpool 2\r\nHuge input, scanf is recommended.\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"提示","value":{"format":"HTML","content":"提示"}}]}