zoj The 12th Zhejiang Provincial Collegiate Programming Contest Demacia of the Ancients
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5504
Time Limit: 2 Seconds Memory Limit: 65536 KB
There is a popular multiplayer online battle arena game called Demacia of the Ancients. There are lots of professional teams playing this game. A team will be approved as Level K if there are exact K team members whose match making ranking (MMR) is strictly greater than 6000.
You are given a list of teams. Please calculate the level of each team.
Input
There are multiple test cases. The first line of input contains an integer T indicating the number of test cases. For each test case:
The first line contains an integer N (1 <= N <= 10) indicating the number of team members.
The second line contains N integers representing the MMR of each team member. All MMRs are non-negative integers less than or equal to 9999.
Output
For each test case, output the level of the given team.
Sample Input
- 3
- 5
- 7986 6984 6645 6200 6150
- 5
- 7401 7377 6900 6000 4300
- 3
- 800 600 200
Sample Output
- 5
- 3
- 0
- 分析;
- 这个也是签到题。
就是找超出6000的个数。- AC代码:
- #include <stdio.h>
- #include <algorithm>
- #include <iostream>
- #include <string.h>
- #include <string>
- #include <math.h>
- #include <stdlib.h>
- #include <queue>
- #include <stack>
- #include <set>
- #include <map>
- #include <list>
- #include <iomanip>
- #include <vector>
- #pragma comment(linker, "/STACK:1024000000,1024000000")
- #pragma warning(disable:4786)
- using namespace std;
- const int INF = 0x3f3f3f3f;
- const int MAX = + ;
- const double eps = 1e-;
- const double PI = acos(-1.0);
- int a[MAX];
- int main()
- {
- int T;
- while(~scanf("%d",&T))
- {
- while(T --)
- {
- memset(a , , sizeof(a));
- int n;
- cin >> n;
- int ans = , temp;
- while(n --)
- {
- scanf("%d",&temp);
- if(temp > )
- ans ++;
- }
- cout << ans << endl;
- }
- }
- return ;
- }
zoj The 12th Zhejiang Provincial Collegiate Programming Contest Demacia of the Ancients的更多相关文章
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Capture the Flag
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5503 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Team Formation
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5494 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Beauty of Array
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5496 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Lunch Time
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5499 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Convert QWERTY to Dvorak
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5502 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest May Day Holiday
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5500 The 12th Zhejiang Provincial ...
- zjuoj The 12th Zhejiang Provincial Collegiate Programming Contest Ace of Aces
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5493 The 12th Zhejiang Provincial ...
- 140 - The 12th Zhejiang Provincial Collegiate Programming Contest(第二部分)
Floor Function Time Limit: 10 Seconds Memory Limit: 65536 KB a, b, c and d are all positive int ...
- 140 - The 12th Zhejiang Provincial Collegiate Programming Contest(浙江省赛2015)
Ace of Aces Time Limit: 2 Seconds Memory Limit: 65536 KB There is a mysterious organization c ...
随机推荐
- 在Delphi中如何控制其它应用程序窗口
在编写Delphi的应用程序中,常常涉及对其它Windows应用程序的操作.例如,在数据库的管理系统中,财务人员需要使用计算器,即可调用Windows内含的计算器功能,若每次使用,均通过“开始/程序/ ...
- C# Unicode编码与解码方法
public static class ExtentMethod { public static string ToUnicodeString(this string str) { StringBui ...
- Android项目框架升级尝鲜OkHttp
本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 随着项目日趋稳定,需求不再总是变化,那么是时间来整理下项目了.先简单介绍下,本项目最初使用loop4 ...
- 桌面应用程序ClickOne打包部署
http://www.cnblogs.com/weixing/p/3358740.html
- Miscellaneous--Tech
1. Questions: 1)EF.2)MVC/MVP/MVVM.3)page lifecyle. preInit,Init,InitCompleted,preLoad,Load,LoadCompl ...
- Linux makefile 教程 非常详细,且易懂 (转)
概述—— 什么是makefile?或许很多Winodws的程序员都不知道这 个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和professional的程序员,makef ...
- 深入理解BootStrap之栅格系统(布局)
1.栅格系统(布局) Bootstrap内置了一套响应式.移动设备优先的流式栅格系统,随着屏幕设备或视口(viewport)尺寸的增加,系统会自动分为最多12列. 我在这里是把Bootstrap中的栅 ...
- LeetCode Single Number III
原题链接在这里:https://leetcode.com/problems/single-number-iii/ 题目: Given an array of numbers nums, in whic ...
- python笔记 - day7
python笔记 - day7 参考: http://www.cnblogs.com/wupeiqi/articles/5501365.html 面向对象,初级篇: http://www.cnblog ...
- saltstack之(十二)配置管理mount
线上很多服务器都需要挂载存储上的公共目录,并实现开机启动(/etc/fstab),比如web的静态文件共享目录,日志远程集中收集等. 一.批量挂载部分. 1.在node1上配置nfs服务器,有关nfs ...