https://nanti.jisuanke.com/t/43387

题意

  奥运会,分别给出RU和US两国的 金牌 银牌 铜牌 数目

    优先度 金牌>银牌>铜牌,其中一种相同则比较下一种,多的一方在color上获胜

    总的奖牌数多的一方在count上获胜

  判断US能在哪种方式上获胜

  水题

代码

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<deque>
#include<iomanip>
#include<list>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<vector>
#include <vector>
#include <iterator>
#include <utility>
#include <sstream>
#include <limits>
#include <numeric>
#include <functional>
using namespace std;
#define gc getchar()
#define mem(a) memset(a,0,sizeof(a))
//#define sort(a,n,int) sort(a,a+n,less<int>()) #define ios ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef char ch;
typedef double db; const double PI=acos(-1.0);
const double eps=1e-6;
const ll mod=1e9+7;
const int inf=0x3f3f3f3f;
const int maxn=1e5+10;
const int maxm=100+10; bool compare(int a, int b)
{
return a < b;//升序
} int a[6] = {0};
int main(){
int n = 0;
cin >> n;
bool num = 0;
bool color = 0;
while(n--)
{
num = 0;
color = 0;
for(int i = 0;i<6;i++)
{
cin >>a[i];
}
for(int i = 0;i<6;i++)
{
cout <<a[i];
if(i<5)cout<<" ";
}
if((a[0]+a[1]+a[2])>(a[3]+a[4]+a[5]))
{
num = 1;
}
if(a[0]>a[3])
{
color = 1;
}
else if(a[0]==a[3] && a[1]>a[4])
{
color = 1;
}
else if(a[0]==a[3] && a[1]==a[4] && a[2]>a[5])
{
color = 1;
}
cout<<endl;
if(num)
{
if(color)
cout<<"both"<<endl;
else
cout<<"count"<<endl;
}
else
{
if(color)
cout<<"color"<<endl;
else
cout<<"none"<<endl;
}
cout<<endl;
} return 0;
}

  

B . Medal Ranking -UCF Local Programming Contest 2015的更多相关文章

  1. UCF Local Programming Contest 2016 J题(二分+bfs)

    题目链接如下: https://nanti.jisuanke.com/t/43321 思路: 显然我们要采用二分的方法来寻找答案,给定一个高度如果能确定在这个高度时是否可以安全到达终点,那我们就可以很 ...

  2. 03.28,周六,12:00-17:00,ICPC训练联盟周赛,选用试题:UCF Local Programming Contest 2016正式赛。

    A. Majestic 10 题意:三个数均大于10则输出"triple-double",如果两个数大于10则输出"double-double",如果一个大于1 ...

  3. 03.21 ICPC训练联盟周赛:UCF Local Programming Contest 2018正式赛

    B Breaking Branches 题意:两个人比赛折枝,谁剩下最后1,无法折出整数即为输 思路:树枝长n,若是奇数,则Bob胜出,若是偶数,则Alice胜出,且需要输出1: 1 #include ...

  4. 04.06 UCF Local Programming Contest 2017

    A.Electric Bill 题意:简单计算题,超过1000部分额外算 1 #include<stdio.h> 2 int main(){ 3 int money1,money2; 4 ...

  5. 2020.3.28-ICPC训练联盟周赛,选用试题:UCF Local Programming Contest 2016

    A.Majestic 10 签到题. #include<iostream> #include<cstdio> #include<cstring> #include& ...

  6. UCF Local Programming Contest 2018 C. First Last Sorting 思维、简单DP

    C. First Last Sorting链接:https://nanti.jisuanke.com/t/44141

  7. German Collegiate Programming Contest 2015 计蒜课

    // Change of Scenery 1 #include <iostream> #include <cstdio> #include <algorithm> ...

  8. Nordic Collegiate Programming Contest 2015​ B. Bell Ringing

    Method ringing is used to ring bells in churches, particularly in England. Suppose there are 6 bells ...

  9. Nordic Collegiate Programming Contest 2015​ G. Goblin Garden Guards

    In an unprecedented turn of events, goblins recently launched an invasion against the Nedewsian city ...

  10. Nordic Collegiate Programming Contest 2015​ E. Entertainment Box

    Ada, Bertrand and Charles often argue over which TV shows to watch, and to avoid some of their fight ...

随机推荐

  1. f-string 高效的字符串格式化

    f-string,称为格式化字符串常量(formatted string literals),是Python3.6新引入的一种字符串格式化方法,该方法源于PEP 498 – Literal Strin ...

  2. vivo官网APP首页端智能业务实践

    作者:vivo 互联网客户端团队- Li Quanlong 本文介绍端智能技术在vivo官网APP的落地实践,通过抽象问题.提出端智能解决方案.方案落地这三大块内容逐步递进地展开端智能技术的应用过程. ...

  3. Maven中配置maven-compiler-plugin 插件和jdk 17版本

    如何修改Maven工程的JDK版本 修改项目中的pom.xml文件,添加maven-compiler-plugin插件3.8.1版本,指定JDK的编译版本为Java 17,简约版配置信息如下: < ...

  4. AWK用法全解

    一.awk介绍 awk是Linux自带的一个逐行扫描的文本处理工具,支持正则表达式.循环控制.条件判断.格式化输出.AWK自身带有一些变量,可以在书写脚本时调用. 二.基本语法格式 2.1.在shel ...

  5. VS下进行CUDA编译时error MSB3721相关的原因之一

    报错:"1>D:\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomization ...

  6. 杂七杂八系列----C#代码如何影响CPU缓存速度?

    CPU与RAM的隔阂 CPU与RAM是两个独立的硬件,并非集成在一起.所以他们两个之间一定会存在一个连接的桥梁,这个桥梁的名字叫做内存总线. 内存总线由三部分组成: 地址总线(Address Bus) ...

  7. 三分钟带你了解一站式大数据平台运维管家ChengYing产品包制作

    课件获取:关注公众号 "数栈研习社",后台私信 "ChengYing" 获得直播课件 视频回放:点击这里 ChengYing 开源项目地址:github 丨gi ...

  8. 开源交流丨一站式大数据平台运维管家ChengYing安装原理剖析

    课件获取:关注公众号"数栈研习社",后台私信 "ChengYing" 获得直播课件 视频回放:点击这里 ChengYing开源项目地址:github 丨 git ...

  9. HyperWorks中的Size and bias 子面板

    此面板是 automesh 经常使用的子面板,通过此面板,用户可用设置单元尺寸.单元类型以及以及映射类型等多种控制选项,然后通过预览按钮查看待生成网格模型的状态.   图 3-6 size and b ...

  10. [abc302f] Merge Set

    F - Merge Set 显然要建图 首先,我们有一个粗略的想法,对于同一集合\(S_i\)内的元素,\(S_{i,j}\)与\(S_{i,j+1}\)间连一条无向的标号为\(i\)的边 那么题目显 ...