2015苏州大学ACM-ICPC集训队选拔赛(1) 1001 1002 1010
签到题
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 180 Accepted Submission(s) : 92
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
Problem Description
我回答,大概是一个逼格很高的比赛吧。
ACM国际大学生程序设计竞赛(英文全称:ACM International Collegiate Programming Contest(ACM-ICPC或ICPC)是由国际计算机学会(ACM)主办的,一项旨在展示大学生创新能力、团队精神和在压力下编写程序、分析和解决问题能力的年度竞赛。经过近30多年的发展,ACM国际大学生程序设计竞赛已经发展成为最具影响力的大学生计算机竞赛。赛事目前由IBM公司赞助。
-来自百度百科
而如今面临退役,一切都快要结束的时候,却发现自己已经逐渐习惯了这种氛围,ACM这一路走来,其中艰辛也只有自己知道,有过快乐和失望,也有期待和迷茫。从一开始奢望ACM带给我什么,到最后走的时候却发现自己更喜欢的是这过程。
我记得当年我做校赛的第一题,其中就有一句ACM就像是一个游戏,如今看来,似乎也是。在ACMer心里,ACM是一场游戏,没有爱过的人,不会懂。
如今将此题献给你们,希望未来的路上你们可以风雨无阻,努力去追寻自己喜欢的事物。所谓梦想,不是一开始的勇不可当,而是永不停息的疯狂。
本题作为签到题,无输入,请输出题目描述中ACM出现的次数,以换行结束。
Author
- #include<stdio.h>
- //#include<bits/stdc++.h>
- #include<string.h>
- #include<iostream>
- #include<math.h>
- #include<sstream>
- #include<set>
- #include<queue>
- #include<vector>
- #include<algorithm>
- #include<limits.h>
- #define inf 0x3fffffff
- #define lson l,m,rt<<1
- #define rson m+1,r,rt<<1|1
- #define LL long long
- using namespace std;
- int main()
- {
- printf("12\n");
- return 0;
- }
丢失的数字
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 224 Accepted Submission(s) : 50
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
Problem Description
Input
数据范围:1<=n,m<=100000,-1e9<=a[i]<=1e9。
Output
Sample Input
- 5 3
- 1 3 4
- 4 6
- 1 3 8 3 11 12
Sample Output
- 2
- 2
Author
- #include<stdio.h>
- //#include<bits/stdc++.h>
- #include<string.h>
- #include<iostream>
- #include<math.h>
- #include<sstream>
- #include<set>
- #include<queue>
- #include<map>
- #include<vector>
- #include<algorithm>
- #include<limits.h>
- #define inf 0x3fffffff
- #define lson l,m,rt<<1
- #define rson m+1,r,rt<<1|1
- #define LL long long
- using namespace std;
- int a;
- map<int,int> q;
- int main()
- {
- int n,m;
- int i;
- int ans;
- while(cin>>n>>m)
- {
- ans=0;
- for(i=1;i<=n;i++)
- {
- q[i]=1;
- }
- for(i=0;i<m;i++)
- {
- cin>>a;
- q[a]=0;
- }
- map<int,int>::iterator it;
- for(it=q.begin();it!=q.end();it++)
- {
- // cout<<it->first<<" "<<it->second<<endl;
- if(it->second!=0)
- {
- ans++;
- }
- }
- cout<<ans<<endl;
- q.clear();
- }
- return 0;
- }
投票
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 65 Accepted Submission(s) : 40
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
Problem Description
Input
对于每组测试数据,第一行是一个整数M,表示参加选举的同学的人数(1 <= M <= 1000)
接下来M行,每行一个字符串,表示猫咪的名字,每个字符串只包含小写字母,而且每个字符串的长度不超过10
Output
Sample Input
- 2
- 3
- zhuzhu
- zhuzhu
- xiaoxin
- 2
- zhuzhu
- zhuzhu
Sample Output
- zhuzhu
- zhuzhu
Author
也是用map存一下,然后根据题意来就好了,这题和HDU1004题相似
- #include<stdio.h>
- //#include<bits/stdc++.h>
- #include<string.h>
- #include<iostream>
- #include<math.h>
- #include<sstream>
- #include<set>
- #include<queue>
- #include<map>
- #include<vector>
- #include<algorithm>
- #include<limits.h>
- #define inf 0x3fffffff
- #define lson l,m,rt<<1
- #define rson m+1,r,rt<<1|1
- #define LL long long
- using namespace std;
- map<string,int> q;
- int main()
- {
- int t;
- string s;
- while(cin>>t)
- {
- while(t--)
- {
- int n;
- int i;
- cin>>n;
- for(i=0; i<n; i++)
- {
- cin>>s;
- q[s]++;
- }
- map<string,int>::iterator it;
- for(it=q.begin(); it!=q.end(); it++)
- {
- // cout<<it->first<<" "<<it->second<<endl;
- if(n%2==0)
- {
- if(it->second>=(n/2))
- {
- cout<<it->first<<endl;
- break;
- }
- }
- else
- {
- if(it->second>=(n/2+1))
- {
- cout<<it->first<<endl;
- break;
- }
- }
- }
- q.clear();
- }
- }
- return 0;
- }
2015苏州大学ACM-ICPC集训队选拔赛(1) 1001 1002 1010的更多相关文章
- 2016 ACM/ICPC Asia Regional Dalian Online 1002/HDU 5869
Different GCD Subarray Query Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K ( ...
- hihocoder1257(构造)(2015北京ACM/ICPC)
题意: 给你n条蛇,a[i]的长度为i,要求组成一个矩形.奇数蛇可折叠奇数次,偶数蛇折叠偶数次,然后按蛇的次序输出 (即一条蛇的输出只能是一个方向的) 2 3 1 2 1 3 2 3 1 1 2 1 ...
- [2013 ACM/ICPC Asia Regional Hangzhou Online J/1010]hdu 4747 Mex (线段树)
题意: + ;];;;], seg[rt << | ]);)) * fa.setv;) * fa.setv;;], seg[rt << | ], r - l + );;, ...
- 2016 ACM/ICPC Asia Regional Qingdao Online 1002 Cure
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission( ...
- 2015 ACM / ICPC 亚洲区域赛总结(长春站&北京站)
队名:Unlimited Code Works(无尽编码) 队员:Wu.Wang.Zhou 先说一下队伍:Wu是大三学长:Wang高中noip省一:我最渣,去年来大学开始学的a+b,参加今年区域赛之 ...
- ACM ICPC 2015 Moscow Subregional Russia, Moscow, Dolgoprudny, October, 18, 2015 G. Garden Gathering
Problem G. Garden Gathering Input file: standard input Output file: standard output Time limit: 3 se ...
- ACM ICPC 2015 Moscow Subregional Russia, Moscow, Dolgoprudny, October, 18, 2015 D. Delay Time
Problem D. Delay Time Input file: standard input Output file: standard output Time limit: 1 second M ...
- hdu 5444 Elven Postman(二叉树)——2015 ACM/ICPC Asia Regional Changchun Online
Problem Description Elves are very peculiar creatures. As we all know, they can live for a very long ...
- (并查集)Travel -- hdu -- 5441(2015 ACM/ICPC Asia Regional Changchun Online )
http://acm.hdu.edu.cn/showproblem.php?pid=5441 Travel Time Limit: 1500/1000 MS (Java/Others) Memo ...
随机推荐
- java.lang.Class.getDeclaredMethod()方法详解
Java.lang.Class.getDeclaredMethod()方法用法 注:方法返回一个Method对象,它反映此Class对象所表示的类或接口的指定已声明方法. 描述 java.lang.C ...
- Arduino Uno 在win7 64位下的驱动问题
1.解压[mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8.rar],将[mdmcpq.inf_amd64_neutral_fbc4a14a6a13d0c8]文件夹复 ...
- 关于android通过shell修改文件权限的学习
首先是文件的读写属性(下图): 要通过shel命令l修改文件权限: 1.首先在cmd里输入adb shell 命令进入编辑模式 2.用cd命令进入到想要修改的文件目录,不知道的时候可以用ls 命令列表 ...
- 第2章 构建springboot工程 2-1 构建SpringBoot第一个demo
以后的趋势肯定是以一个微服务为主导的, Spring-Boot的指导 Maven整个环境构建之前的整个项目其实是一个很普通的J2SE项目,它构建完之后会进行重构,重构为Maven的一个项目路径.可以看 ...
- php中用大括号把?>和<?php框起来的作用
<?php function my_function() { ?> My function was called <!--就是这里,为什么前面要用?>和< ?php 把M ...
- koa1链接mongodb
1.项目下安装mongodb和mongoose npm install mongodb --save-dev npm install mongoose --save-dev 2.router中 var ...
- 业务逻辑:五、完成认证用户的动态授权功能 六、完成Shiro整合Ehcache缓存权限数据
一. 完成认证用户的动态授权功能 提示:根据当前认证用户查询数据库,获取其对应的权限,为其授权 操作步骤: 在realm的授权方法中通过使用principals对象获取到当前登录用户 创建一个授权信息 ...
- NSButton添加事件
-(void)addButton { NSButton* pushButton = [[NSButton alloc] initWithFrame: NSMakeRect(, , , )]; push ...
- C++面试笔记--const、sizeof
首先来一个关于const的全面的解释,先看一波代码,之后再进行详细的分情况解释 ; const int *a=&b;//指向一个int常量的指针 int const *a=&b;//和 ...
- 【Arcgis for android】spatialite打开shapefile
互联网(free and share) 本文参考下面的博文: http://blog.csdn.net/arcgis_all/article/details/8232976 Preparation: ...