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

  1. 3
  2. 5
  3. 7986 6984 6645 6200 6150
  4. 5
  5. 7401 7377 6900 6000 4300
  6. 3
  7. 800 600 200

Sample Output

  1. 5
  2. 3
  3. 0
  4.  
  5. 分析;
  6.  
  7. 这个也是签到题。
    就是找超出6000的个数。
  8.  
  9. AC代码:
  10.  
  1. #include <stdio.h>
  2. #include <algorithm>
  3. #include <iostream>
  4. #include <string.h>
  5. #include <string>
  6. #include <math.h>
  7. #include <stdlib.h>
  8. #include <queue>
  9. #include <stack>
  10. #include <set>
  11. #include <map>
  12. #include <list>
  13. #include <iomanip>
  14. #include <vector>
  15. #pragma comment(linker, "/STACK:1024000000,1024000000")
  16. #pragma warning(disable:4786)
  17.  
  18. using namespace std;
  19.  
  20. const int INF = 0x3f3f3f3f;
  21. const int MAX = + ;
  22. const double eps = 1e-;
  23. const double PI = acos(-1.0);
  24.  
  25. int a[MAX];
  26.  
  27. int main()
  28. {
  29. int T;
  30. while(~scanf("%d",&T))
  31. {
  32. while(T --)
  33. {
  34. memset(a , , sizeof(a));
  35. int n;
  36. cin >> n;
  37. int ans = , temp;
  38. while(n --)
  39. {
  40. scanf("%d",&temp);
  41. if(temp > )
  42. ans ++;
  43. }
  44. cout << ans << endl;
  45. }
  46. }
  47. return ;
  48. }

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. pdo封装类

    <?php //http://www.imavex.com/php-pdo-wrapper-class/ class db extends PDO { private $error; priva ...

  2. jQuery.mobile.activePage获取当点活动的page

    <!doctype html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  3. 使用dotTrace6.0进行内存分析

    dotTrace6.0提供了内存分析功能,统计抓取的时间段内各个堆栈执行过程中使用的内存大小,按照堆栈执行情况树状排序:和它之前提供的时间统计类似,粗截了几个页面,希望对大家有所帮助. 下载安装Jet ...

  4. php源码安装

    要用swoole,首先需要有PHP环境.由于swoole的某些特性,最好是能够从源码编译安装PHP,这样在使用过程中可以避免很多不必要的错误.PHP下载地址:http://php.net/在这里挑选你 ...

  5. html代码转义到js时,往往会遇到问题,这代码实现html和js互转

    这段代码是直接可以用的,大家不妨试试.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...

  6. node.js学习路线图

    http://www.admin10000.com/document/4624.html

  7. Java 进程(转)

    转自http://jiangshuiy.iteye.com/blog/1674235 PS:今天做android助手项目的时候,发现adb push命令执行会卡死,最后发现不能用waitfor阻塞等待 ...

  8. {$ecs_css_path}

    includes里的init.php的187-194行 if (!empty($_CFG['stylename'])) { $smarty->assign('ecs_css_path', 'th ...

  9. AFN 加Header

    AFHTTPSessionManager * manager = [AFHTTPSessionManager manager]; manager.responseSerializer.acceptab ...

  10. 【Android Studio快捷键】之导入相应包声明(import packages)

    可能import 单个声明的快捷键大家都很容易找到,Alt+Enter.但是如果我要一次性import文件中所有的声明,这个快捷键是什么呢,找啊找的,就是没找到,以前在Eclipse是Ctrl+1,但 ...