Gym - 101194L World Cup 暴力
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 暴力的更多相关文章
- 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 ...
- Codeforces Gym 100015H Hidden Code 暴力
Hidden Code 题目连接: http://codeforces.com/gym/100015/attachments Description It's time to put your hac ...
- Codeforces gym 100685 A. Ariel 暴力
A. ArielTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/A Desc ...
- Codeforces Gym 100637G G. #TheDress 暴力
G. #TheDress Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100637/problem/G ...
- Gym 101055A 计算几何,暴力
http://codeforces.com/gym/101055/problem/A 题目:给定一些三维空间的点,要你找一个平面,能覆盖尽量多的点,只要求输出点数即可.n<=50 因为数据量小, ...
- Codeforces Gym 100203G Good elements 暴力乱搞
原题链接:http://codeforces.com/gym/100203/attachments/download/1702/statements.pdf 题解 考虑暴力的复杂度是O(n^3),所以 ...
- Codeforce Gym 100015I Identity Checker 暴力
Identity Checker 题目连接: http://codeforces.com/gym/100015/attachments Description You likely have seen ...
- Gym - 101848B Almost AP 暴力
题目链接:http://codeforces.com/gym/101848/problem/B 给出一串数字要你最多改动三个数字使这一串数字成为等差数列.因为最多改动三个数字所以可以先求出相邻两项的差 ...
- code Gym 100500D T-shirts(暴力)
因为只能买一次,暴力枚举一下买的衣服的大小. #include<cstdio> #include<map> #include<algorithm> using na ...
随机推荐
- 在VS如何查看汇编代码
由于最近不常用,结果导致今天用的时候忘记了,╮(╯▽╰)╭.现在标记一下: 方法如下,先创建一个C++ Project,然后加入上面的代码,在main函数或者其他地方设置断点,注意是Debug版本,否 ...
- Qt5.5以来对Network的改进(包括对SSL的功能支持,HTTP的重定向等等)
Qt Network New SSL back-end for iOS and OS X based on Secure Transport. Note that in Qt 5.6 this wil ...
- 浅谈js闭包(closure)
相信很多从事js开发的朋友都或多或少了解一些有关js闭包(closure)的知识. 本篇文章是从小编个人角度,简单地介绍一下有关js闭包(closure)的相关知识.目的是帮助一些对js开发经验不是很 ...
- 移动IM开发指南3:如何优化登录模块
<移动IM开发指南>系列文章将会介绍一个IM APP的方方面面,包括技术选型.登陆优化等.此外,本文作者会结合他在网易云信多年iOS IM SDK开发的经验,深度分析实际开发中的各种常见问 ...
- Dart 异步编程相关概念简述
目录 isolate: event loop: Future: async/await: 总结 参考链接 学习 Dart 的异步编程时,需要对异步编程所涉及的相关知识体系进行梳理,我们可根据以下几 ...
- java基础知识总结(一)
满满的干货=-= (一)环境变量的作用: 每个人刚开始学习java的时候,肯定都是安装JDK,配置环境变量,怎么配置网上教程很多很多,但是为什么这么配置呢? 我配置的环境变量: JAVA_HOME:C ...
- docker相关使用
安装docker 在CentOS 7上安装docker-ce,首先检查系统中是否已经安装过docker及相关依赖: $ sudo yum remove docker docker-client doc ...
- web交互方式---ajax
知识不怕旧,关键在于在旧知识的基础上不断创新与提高! 引入一个问题:打开一个浏览器,在地址栏输入一个网址,按下 enter 键到看到整个页面,中间都经历了哪些事情? 这是一个前端的面试题,相信很多朋友 ...
- leadcode的Hot100系列--64. 最小路径和--权值最小的动态规划
如果这个: leadcode的Hot100系列--62. 不同路径--简单的动态规划 看懂的话,那这题基本上是一样的, 不同点在于: 1.这里每条路径相当于多了一个权值 2.结论不再固定,而是要比较不 ...
- sql 中 并集union和union all的使用区别
union 操作符用于合并两个或多个 SELECT 语句的结果集,并且去除重复数据,按照数据库字段的顺序进行排序. 例 SELECT NAME FROM TABLE1UNIONSELECT EMP_ ...