World Cup
Input file: Standard Input
Output file: Standard Ouptut
Time limit: 1 second

Here is World Cup again, the top 32 teams come together to fight for the World Champion.
The teams are assigned into 8 groups, with 4 teams in each group. Every two teams in the same
group will play a game (so there are totally 6 games in each group), and the winner of this game
gets 3 points, loser gets 0 point. If it is a tie game, both teams get 1 point.
After all games finished, we get the scoreboard, but we forget the result of each game, can you
help us to figure the result of each game? We only care about the win/lose/tie result of each
game, but we don’t care the goals in each game.
Input
The input starts with one line containing exactly one integer T, which is the number of test cases.
Each test case contains four space-separated integers A, B, C, D, in a line, which indicate the
points each team gets after all 6 games.
Output
For each test case, output one line containing Case #x: y, where x is the test case number
(starting from 1) and y is “Yes” if you can point out the result of each game, or “No” if there are
multiple game results satisfy the scoreboard, or “Wrong Scoreboard” if there is no game result
matches the scoreboard.

Limits
• 1 ≤ T ≤ 100.
• 0 ≤ A, B, C, D ≤ 100.

Sample Input
3
9 6 3 0
6 6 6 0
10 6 3 0

Sample Output
Case #1: Yes
Case #2: No
Case #3: Wrong Scoreboard

Note
In sample case #1, the only scenaro will be: the first team wins all the three games it plays, the
second team loses to the first team and wins the other two, the third team only wins the game
with the fourth, and the fourth team lose all the games.
In sample case #2, the fourth team loses all the games, and the first three teams get into a
winning-cycle, but there may be two different winning-cycles: first team wins second team, second
team wins third team, third team wins first team OR first team wins third team, third team wins
second team, second team wins first team. We can’t figure which winning-cycle is the actual game
result.
In sample case #3, the first team get 10 points, but no team could get more than 9 points by
play three games, so it is a wrong scoreboard.

大意:根据世界杯赛制, 每轮有四场比赛, 每支队伍与其他三支队伍各打一场比赛, 一共有六场比赛。给出四支球队分别的得分,能否确定唯一的胜负关系。

思路:此题可以暴力枚举出所有的情况与输入分数进行匹配。根据匹配成功的次数可以判断最终结果。

Gym - 101194L World Cup 暴力的更多相关文章

  1. Gym 101194L / UVALive 7908 - World Cup - [三进制状压暴力枚举][2016 EC-Final Problem L]

    题目链接: http://codeforces.com/gym/101194/attachments https://icpcarchive.ecs.baylor.edu/index.php?opti ...

  2. Codeforces Gym 100015H Hidden Code 暴力

    Hidden Code 题目连接: http://codeforces.com/gym/100015/attachments Description It's time to put your hac ...

  3. Codeforces gym 100685 A. Ariel 暴力

    A. ArielTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/A Desc ...

  4. Codeforces Gym 100637G G. #TheDress 暴力

    G. #TheDress Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100637/problem/G ...

  5. Gym 101055A 计算几何,暴力

    http://codeforces.com/gym/101055/problem/A 题目:给定一些三维空间的点,要你找一个平面,能覆盖尽量多的点,只要求输出点数即可.n<=50 因为数据量小, ...

  6. Codeforces Gym 100203G Good elements 暴力乱搞

    原题链接:http://codeforces.com/gym/100203/attachments/download/1702/statements.pdf 题解 考虑暴力的复杂度是O(n^3),所以 ...

  7. Codeforce Gym 100015I Identity Checker 暴力

    Identity Checker 题目连接: http://codeforces.com/gym/100015/attachments Description You likely have seen ...

  8. Gym - 101848B Almost AP 暴力

    题目链接:http://codeforces.com/gym/101848/problem/B 给出一串数字要你最多改动三个数字使这一串数字成为等差数列.因为最多改动三个数字所以可以先求出相邻两项的差 ...

  9. code Gym 100500D T-shirts(暴力)

    因为只能买一次,暴力枚举一下买的衣服的大小. #include<cstdio> #include<map> #include<algorithm> using na ...

随机推荐

  1. Windows应用程序文件说明

    bin文件夹:包含debug子目录,含有.exe可执行文件和pdb文件,其中pdb文件包含完整的调试信息(包含函数原型): obj文件夹:包含debug子目录,含有编译过程中生成的中间代码. Prop ...

  2. 笨重的mfc还在基于系统控件,熟练的mfc工程师还比不过学习Qt一个月的学生开发效率高(比较精彩,韦易笑)

    作者:韦易笑链接:https://www.zhihu.com/question/29636221/answer/45102191来源:知乎著作权归作者所有,转载请联系作者获得授权. 更新:擦,本来只有 ...

  3. visual studio添加docker支持简记

    很久以前学过一段时间的docker,那时装了电脑卡得受不了,学了一会就卸载了,最近电脑又装上了docker,感觉好像没有以前这么卡了,还是同一台电脑surface pro4, 试了一下visual s ...

  4. CrashRpt_v.1.4.2_vs2008_also_ok

    1.windows多线程程序release版崩溃记录工具,便于该如何查找错误. 2.此工具主要用来配置windbug工具,一种排查程序发布版本崩溃这种非常难处理的缺陷的方法,非常棒,amazing! ...

  5. Ruby元编程:动态添加类属性及其实际应用

    上个星期测试道的Monkey老师和我聊到测试用例参数过多的问题,其实这样的问题在我这里也同样经历过.比如我的测试用例必须面对不同的测试环境,每个环境有无数的参数,开发的最初阶段,因为参数少,所以就放在 ...

  6. LFS Linux From Scratch 笔记(经验非教程)

    做了一个自己的DIY Linux系统.从编译每一行代码,建立每一个文件系统结构开始. 创造自己的GNU/Linux系统,不同于任何发行版.按照的教程是来自 linuxfromscratch.org 来 ...

  7. mpvue 开发小程序接口数据统一管理

    mpvue项目里做API与数据分离统一管理 小程序里请求数据接口使用wx:request,因为考虑项目比较大,最好把wx:request封装起来,统一使用管理 utils.js 配置开发环境和线上环境 ...

  8. 02、MySQL—数据库基本操作

    数据库是数据存储的最外层(最大单元) 1.创建数据库 基本语法:create database 数据库名字 [库选项]; 范例:使用create database 创建数据库 库选项:数据库的相关属性 ...

  9. 12 jQuery的ajax

    什么是ajax AJAX = 异步的javascript和XML(Asynchronous Javascript and XML) 简言之,在不重载整个网页的情况下,AJAX通过后台加载数据,并在网页 ...

  10. [代码修订版] Python 踩坑之旅进程篇其五打不开的文件

    目录 1.1 踩坑案例 1.2 填坑和分析 1.2.1 从程序优化入手 1.2.2 从资源软硬限入手 1.4.1 技术关键字 下期坑位预告 代码示例支持 平台: Centos 6.3 Python: ...