http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5504

 The 12th Zhejiang Provincial Collegiate Programming Contest - L
Demacia of the Ancients

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的更多相关文章

  1. 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 ...

  2. zoj The 12th Zhejiang Provincial Collegiate Programming Contest Team Formation

    http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5494 The 12th Zhejiang Provincial ...

  3. 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 ...

  4. zoj The 12th Zhejiang Provincial Collegiate Programming Contest Lunch Time

    http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5499 The 12th Zhejiang Provincial ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. Day09

    Servlet概述 生命周期方法: void init(ServletConfig):出生之后(1次): void service(ServletRequest request, ServletRes ...

  2. nrf51822裸机教程-PPI

    Programmable Peripheral Interconnect即可编程外设互联 系统,该模块是51822 提供的一个特性. 目的是为了让51822 的外围模块可以不通过处理器而自动相互作用. ...

  3. 《黑客大曝光》实践部分——sql注入(7/8)

    SQL注入实践 由于<黑客大曝光>中涉及到形形色色的攻击方式,从软件到硬件,甚至还有物理锁的开锁教程,当中的很多教程很有趣,但是我没有相关的环境,实践起来不好操作,比如说,查点扫描我还可以 ...

  4. 欢迎大家提问Android技术及职业生涯等问题

    博客出自:http://blog.csdn.net/liuxian13183,转载注明出处! All Rights Reserved ! 最近有些时间,但QQ群问的问题比较多,不能一一解答,如果有价值 ...

  5. QLineEdit 仿QQ签名框(思路很独特:用QSS::hover显示额外的图片)

    今天鼓捣了半天,终于实现了自定义Qt中的QlineEdit控件的大致效果. 这个问题对于新手而言,主要有以下几个难点: 1.继承QLineEdit控件 2.QSS设置QLineEdit的相关样式,可以 ...

  6. RepositoryItemComboBox 用法1

    RepositoryItemComboBox cbbEnd = new RepositoryItemComboBox(); cbbEnd.TextEditStyle = DevExpress.Xtra ...

  7. MVC 中的 ViewModel

    此文章总结自:http://rachelappel.com/use-viewmodels-to-manage-data-amp-organize-code-in-asp.net-mvc-applica ...

  8. setContentScaleFactor 设置图片的分辨率

    float scale = [[UIScreenmainScreen] scale];//得到设备的分辨率 [imageView setContentScaleFactor:[[UIScreen ma ...

  9. block iOS 块

    block 是个很陌生的东西啊.以前没有学会,现在再看它,还是觉得很稀奇古怪. 无奈,之后硬着头皮学了.. //有参返回值 格式: 返回值类型 (^变量名)(参数类型及个数) = ^(形参列表){ 代 ...

  10. 开始了ecshop

    一个多星期前开始接触ecshop,突然决定要用它来做网站,于是从网上找各种手册与视频,联系官网客服,然后知道官网一共提供三种类型的服务,一种是ecshop授权,不包含任何技术支持,第二种是易开店的标准 ...