HDU2094STL
来源:互联网 发布:手机散热器软件最好 编辑:程序博客网 时间:2024/05/08 16:41
原题http://acm.hdu.edu.cn/showproblem.php?pid=2094
//STL的运用,如果将总的人数减去输的人数,结果等于1,那么就能判断出冠军#include <stdio.h>#include <stdlib.h>#include <malloc.h>#include <limits.h>#include <ctype.h>#include <math.h>#include <string.h>#include <string>#include <algorithm>#include <iostream>#include <stack>#include <queue>#include <deque>#include <map>#include <set>#include <vector>using namespace std;int main(){int n;int i;while(~scanf("%d%*c",&n)){if(n == 0)break;string a;string b;set<string>all;set<string>sum;for(i=0;i<n;i++){cin>>a>>b;all.insert(a);all.insert(b);sum.insert(b);}if(all.size()-sum.size() == 1){printf("Yes\n");}elseprintf("No\n");}return 0;}
0 0
- HDU2094STL
- 如何发布android应用程序
- 1>CVTRES : fatal error CVT1100: 资源重复。类型: MANIFEST,名称: 1,语言: 0x0409
- MySQL汇总数据
- c语言入门(七)函数
- POJ 1018 Communication System 题解
- HDU2094STL
- 4-0. 求符合给定条件的整数集(15)
- 安卓小渣渣的成长之路1.0——使用SimpleCursorAdapter添加列表视图内容(获取手机通讯录名字)
- Q9.7
- 1477: 青蛙的约会 (扩展欧几里得算法)
- c语言入门(八)结构体
- php web分布式后,memcache存session实现多域名跨域登录
- 第一期“晋IT”分享成长沙龙
- Java简单案例:JProgressBar与SwingWorker的配合实用