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 ...
随机推荐
- Android零基础入门第74节:Activity启动和关闭
上一期我们学习了Activity的创建和配置,当时留了一个悬念,如何才能在默认启动的Activity中打开其他新建的Activity呢?那么本期一起来学习如何启动和关闭Activity. 一.概述 经 ...
- Verilog写一个对数计算模块Log2(x)
网上一个能用的也没有,自己写一个把. 1.计算原理: 整数部分 网上找到了一个c语言的计算方法如下: int flog2(float x) { return ((unsigned&)x> ...
- Android前沿技术
一.热升级Tinker源码解析与手写二.热修复阿里百川Sophix内核原理三.App Instantgoogle8.0 类似热更新技术原理与实战四.强制更新1.银行应用非对称加密对称加密五.组件化框架 ...
- Java 添加、修改PPT幻灯片中的表格
本文将介绍通过Java编程在PPT操作表格的方法.包括添加表格到PPT幻灯片,并设置表格样式.单元格对齐方式.单元格背景色.边框样式.字体.字号.合并单元格等:同时,通过加载已有表格的幻灯片也可以对表 ...
- 安装Flume——海量日志收集聚合系统
下载flume: 1.官方网站下载: http://flume.apache.org/download.html 2.百度网盘资源: apache-flume-1.9.0-bin.tar 链接:ht ...
- 【简易bat脚本】启动java程序
前置条件:path中添加了JAVAHOME配置了java环境变量 1.新建txt文本文件 2.粘贴以下内容 @echo off set path=%path%;.;java -classpath &q ...
- Knative 初体验:Build Hello World
作者 | 阿里云智能事业群技术专家 冬岛 Build 模块提供了一套 Pipeline 机制.Pipeline 的每一个步骤都可以执行一个动作,这个动作可以是把源码编译成二进制.可以是编译镜像也可以是 ...
- 《收获,不止SQL优化》读书笔记
整体性能分析 AWR.ASH.ADDM.AWRDD 整体分析调优工具 AWR:关注数据库的整体性能的报告: ASH:数据库中的等待事件与哪些SQL具体对应的报告: ADDM:oracle给出的一些建议 ...
- JavaScript 词法作用域不完全指北
在 JavaScript 作用域不完全指北 中,我们介绍了作用域的概念以及 JavaScript 引擎.编译器和作用域的关系.作用域有两种主要的工作模型:词法作用域和动态作用域.其中最为普遍的也是大多 ...
- Oracle Awr报告_awr报告解读_基础简要信息
导出 关于awr报告的导出,上一篇博客已经进行过讲述了.博客链接地址:https://www.cnblogs.com/liyasong/p/oracle_report1.html 这里就不再赘述. ...