A . Find the Twins -UCF Local Programming Contest 2015

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

水题 zack和mack有对应的球员数字 从序列中找出是否存在

代码

#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 member[10] = {0};
int main(){
	int n = 0;
	cin >> n;
	bool zack = 0;
	bool mack = 0;
	while(n--)
	{
		zack = 0;
		mack = 0;
		for(int i = 0;i<10;i++)
		{
			cin >>member[i];
		}
		for(int i = 0;i<10;i++)
		{
			cout <<member[i];
			if(i<9)cout<<" ";
			if(member[i] == 18){
				mack = 1;
			}
			if(member[i] == 17){
				zack = 1;
			}
		}
		cout<<endl;
		if(zack)
		{
			if(mack)
				cout<<"both"<<endl;
			else
				cout<<"zack"<<endl;
		}
		else
		{
			if(mack)
				cout<<"mack"<<endl;
			else
				cout<<"none"<<endl;
		}
		cout<<endl;
	}
	
    return 0;
}

  

posted @ 2020-03-08 16:45  YukiRinLL  阅读(98)  评论(0编辑  收藏  举报