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;
}
A . Find the Twins -UCF Local Programming Contest 2015的更多相关文章
- UCF Local Programming Contest 2016 J题(二分+bfs)
题目链接如下: https://nanti.jisuanke.com/t/43321 思路: 显然我们要采用二分的方法来寻找答案,给定一个高度如果能确定在这个高度时是否可以安全到达终点,那我们就可以很 ...
- 03.28,周六,12:00-17:00,ICPC训练联盟周赛,选用试题:UCF Local Programming Contest 2016正式赛。
A. Majestic 10 题意:三个数均大于10则输出"triple-double",如果两个数大于10则输出"double-double",如果一个大于1 ...
- 03.21 ICPC训练联盟周赛:UCF Local Programming Contest 2018正式赛
B Breaking Branches 题意:两个人比赛折枝,谁剩下最后1,无法折出整数即为输 思路:树枝长n,若是奇数,则Bob胜出,若是偶数,则Alice胜出,且需要输出1: 1 #include ...
- 04.06 UCF Local Programming Contest 2017
A.Electric Bill 题意:简单计算题,超过1000部分额外算 1 #include<stdio.h> 2 int main(){ 3 int money1,money2; 4 ...
- 2020.3.28-ICPC训练联盟周赛,选用试题:UCF Local Programming Contest 2016
A.Majestic 10 签到题. #include<iostream> #include<cstdio> #include<cstring> #include& ...
- UCF Local Programming Contest 2018 C. First Last Sorting 思维、简单DP
C. First Last Sorting链接:https://nanti.jisuanke.com/t/44141
- German Collegiate Programming Contest 2015 计蒜课
// Change of Scenery 1 #include <iostream> #include <cstdio> #include <algorithm> ...
- 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 ...
- Nordic Collegiate Programming Contest 2015 G. Goblin Garden Guards
In an unprecedented turn of events, goblins recently launched an invasion against the Nedewsian city ...
- 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 ...
随机推荐
- RabbitMQ基本原理及模式介绍
一.RabbitMQ概念 RabbitMQ:是一个由erlang开发的AMQP(Advanced Message Queue 高级消息队列协议 )的开源实现,由于erlang 语言的高并发特性,性能较 ...
- 面试题|Spring中BeanFactory与ApplicationContext的本质区别和作用
BeanFactory 是Bean工厂,是Spring 框架最核心的接口,它提供了高级IoC 的配置机制.如果说BeanFactory是Spring的心脏,那么应用上下文ApplicationCo ...
- Spring Boot 整合 ActiveMQ 实现手动确认和重发消息
消息队列中间件是分布式系统中重要的组件,已经逐渐成为企业系统内部通信的核心手段.主要功能包括松耦合.异步消息.流量削锋.可靠投递.广播.流量控制.最终一致性等.实现高性能,高可用,可伸缩和最终一致性架 ...
- python中的split()函数
Python split() 通过指定分隔符对字符串进行切片,如果参数 num 有指定值,则分隔 num+1 个子字符串 a,b,c=input().split(,) 意思是在a,b,c三个输入值直接 ...
- 破局AI问答专有名词检索迷局:分词期神器强势登场!
有客户深度使用全文检索模式检索分段,反馈一些专有名词无法被检索到(例如把"小米手机"分成了"小米"和"手机"两个词,对检索结果造成较大干扰) ...
- Dify实战案例:AI邮件批量发送器!
在 Dify 的使用中,有很多很实用并且很好玩的案例,例如今天给大家介绍这个"AI邮件批量发送器". 在没有 Dify 之前,我们要实现邮件的批量发送是件很难的事,不但要写很长的代 ...
- Arduino从零开始的高手之路——初识Arduino
初识Arduino 时隔若干年,重启Arduino入门教程~ Arduino自2005年推出以来,广受好评,如今已成为最热门的开源硬件之一.在全球最大的开源社区Github上,Arduino已经成为了 ...
- 数栈技术分享:前端小姐姐和你聊聊IOC中依赖注入那些事 (Dependency inject)
Part1: What is Dependency injection 依赖注入定义为组件之间依赖关系由容器在运行期决定,形象的说即由容器动态的将某个依赖关系注入到组件之中在面向对象编程中,我们经 ...
- Dapr Conversation 构建块
Dapr Conversation 是 Dapr(Distributed Application Runtime)在 1.15 版本中引入的新 API(Alpha 阶段),旨在简化与大型语言模型(LL ...
- MongoDB入门实战教程(4)
通过前面几篇的铺垫,我们基本了解了MongoDB是个什么东西,搭建起了一个MongoDB的小集群环境.接下来,我们就来学习一下MongoDB的基本操作. 1 insert操作 我们都知道对于传统关系型 ...