zoukankan      html  css  js  c++  java
  • B . Medal Ranking -UCF Local Programming Contest 2015

    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;
    }
    

      

    作者:YukiRinLL

    出处:YukiRinLL的博客--https://www.cnblogs.com/SutsuharaYuki/

    您的支持是对博主最大的鼓励,感谢您的认真阅读。

    本文版权归作者所有,欢迎转载,但请保留该声明。

  • 相关阅读:
    BZOJ2142: 礼物
    GYM100633J. Ceizenpok’s formula 扩展lucas模板
    Codeforces451E Devu and Flowers
    BZOJ2982: combination Lucas模板
    UVAL3700
    BZOJ2821: 作诗(Poetize)
    BZOJ2724: [Violet 6]蒲公英
    Luogu P1858 多人背包
    Luogu P2831 愤怒的小鸟(状压+记忆化搜索)
    Luogu P4205 [NOI2005]智慧珠游戏
  • 原文地址:https://www.cnblogs.com/SutsuharaYuki/p/12443392.html
Copyright © 2011-2022 走看看