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. 在Delphi中如何控制其它应用程序窗口

    在编写Delphi的应用程序中,常常涉及对其它Windows应用程序的操作.例如,在数据库的管理系统中,财务人员需要使用计算器,即可调用Windows内含的计算器功能,若每次使用,均通过“开始/程序/ ...

  2. C# Unicode编码与解码方法

    public static class ExtentMethod { public static string ToUnicodeString(this string str) { StringBui ...

  3. Android项目框架升级尝鲜OkHttp

    本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 随着项目日趋稳定,需求不再总是变化,那么是时间来整理下项目了.先简单介绍下,本项目最初使用loop4 ...

  4. 桌面应用程序ClickOne打包部署

    http://www.cnblogs.com/weixing/p/3358740.html

  5. Miscellaneous--Tech

    1. Questions: 1)EF.2)MVC/MVP/MVVM.3)page lifecyle. preInit,Init,InitCompleted,preLoad,Load,LoadCompl ...

  6. Linux makefile 教程 非常详细,且易懂 (转)

    概述—— 什么是makefile?或许很多Winodws的程序员都不知道这 个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和professional的程序员,makef ...

  7. 深入理解BootStrap之栅格系统(布局)

    1.栅格系统(布局) Bootstrap内置了一套响应式.移动设备优先的流式栅格系统,随着屏幕设备或视口(viewport)尺寸的增加,系统会自动分为最多12列. 我在这里是把Bootstrap中的栅 ...

  8. LeetCode Single Number III

    原题链接在这里:https://leetcode.com/problems/single-number-iii/ 题目: Given an array of numbers nums, in whic ...

  9. python笔记 - day7

    python笔记 - day7 参考: http://www.cnblogs.com/wupeiqi/articles/5501365.html 面向对象,初级篇: http://www.cnblog ...

  10. saltstack之(十二)配置管理mount

    线上很多服务器都需要挂载存储上的公共目录,并实现开机启动(/etc/fstab),比如web的静态文件共享目录,日志远程集中收集等. 一.批量挂载部分. 1.在node1上配置nfs服务器,有关nfs ...