Problem Description

Soapbear is the mascot of WHUACM team. Like other bears, Soapbear loves honey very much, so he decides to get some honeycombs for honey. There are N honeycombs hanging on some trees, numbered from 1 to N, and the height of honeycomb i is Hi. The height Soapbear can reach the is Hx, so he wonders how many honeycombs he can get at most.

Input

There are multiple test cases in the input file. There first line of the input is an integer T indicates the number of the test cases. Each test case starts with a line containing two integer, N and Hx (0 < N <= 200000, 0 < Hx < 200). Next, there is a line of N integers specifying Hi (1 <= i <= N, 0 < Hi < 200).

Output

For each test case, output a line with an integer indicates the number of honeycombs Soapbear can get at most.

Sample Input

2
2 180
170 190
3 180
180 170 190

Sample Output

1
2

HINT

Note:Input/Output of scanf/printf is faster than cin/cout, so if a problem has huge input data, use cin will probably get a Time Limit Exceeded.

 #include<stdio.h>
#define N 200001
int main()
{
int n,m,Hx=;
int a[N];
scanf("%d",&n);
while(n--)
{
int result=;
for(int i=;i<N;i++)
a[i]=;
scanf("%d",&m);
scanf("%d",&Hx);
for(int j=;j<m;j++)
{
scanf("%d",&a[j]);
}
for(int k=;k<m;k++)
{
if(a[k]<=Hx)
result++;
}
printf("%d\n",result);
}
return ;
}

武汉科技大学ACM:1005: Soapbear and Honey的更多相关文章

  1. 武汉科技大学ACM:1006: 我是老大

    Problem Description 今年是2021年,正值武汉科技大学 ACM俱乐部成立10周年.十周年庆祝那天,从ACM俱乐部走出去的各路牛人欢聚一堂,其乐融融.庆祝晚会上,大家纷纷向俱乐部伸出 ...

  2. 武汉科技大学ACM:1005: 单位转换

    Problem Description BobLee最近在复习考研,在复习计算 机组成原理的时候,遇到了一个问题.就是在计算机存储里面的单位转换.我们都知道1MB=1024KB,1KB=1024B,1 ...

  3. 武汉科技大学ACM:1005: 华科版C语言程序设计教程(第二版)例题5.8

    Problem Description 老师给小豪出了一道题目:给你两个整数x和n(-10<=x<=10,1<=n<=10),让你求出x^1+x^2+x^3+……+x^n的结果 ...

  4. 武汉科技大学ACM :1005: 一二三

    Problem Description 你弟弟刚刚学会写英语的一(one).二(two)和三(three).他在纸上写了好些一二三,可惜有些字母写错了.已知每个单词最多有一个字母写错了(单词长度肯定不 ...

  5. 武汉科技大学ACM :1005: C语言程序设计教程(第三版)课后习题6.6

    Problem Description 打印出所有"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该本身. 例如:153是一个水仙花数,因为1 ...

  6. 武汉科技大学ACM :1005: A+B for Input-Output Practice (V)

    Problem Description Your task is to calculate the sum of some integers. Input Input contains an inte ...

  7. 武汉科技大学ACM :1005: 零起点学算法101——手机短号

    Problem Description 大家都知道,手机号是一个11位长的数字串,同时,作为学生,还可以申请加入校园网,如果加入成功,你将另外拥有一个短号.假设所有的短号都是是 6+手机号的后5位,比 ...

  8. 武汉科技大学ACM :1001: A+B for Input-Output Practice (I)

    Problem Description Your task is to Calculate a + b. Too easy?! Of course! I specially designed the ...

  9. 武汉科技大学ACM:1010: 电话号码

    Problem Description LXD打算换个手机号码,但是他去营业厅选号码的时候却把移动的客服小姐烦得不行,因为他太挑三捡四啦.对于一个手机号的后六位数字(前面五位他就无所谓了),LXD有很 ...

随机推荐

  1. 去除win8.1这台电脑中的6个库文件夹

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace,备份之后删除 wi ...

  2. Win7主题被禁用

    今天早上干了一件傻缺的事,打开电脑的时候,某卫士提醒开机速度击败全国0.2%的电脑,之后点了优化...随后就发生了接下来的一幕: win7下面的主题都不能使用了,只能使用那种复古(很丑的样式,看着很不 ...

  3. CSS中.和#区别

    一.问题来源 制作导航栏,参考别人的代码,发现的. 二.解析 2.1 概述 id:用来定义页面中大的样式,如栏目划分,顶部,正文,底部等:用#top的形式来定义: class:用来定义一些比较细节的样 ...

  4. Rectangle 响应按键

    import QtQuick 2.4 import QtQuick.Window 2.2 Window { visible: true MainForm { anchors.fill: parent ...

  5. ANDROID与.Net之间JSON实践

    Asp.Net端: JsonHelper.cs using System.Runtime.Serialization.Json; using System.IO; using System.Text; ...

  6. 动态树LCT

    #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> usin ...

  7. 深入JS系列学习4

    深入JS系列学习4 Javascript 装载和执行 明白了JS的装载和执行,没有给出很好的解决方案,在IE下可用defer属性: 浏览器对于Javascript的运行有两大特性:1)载入后马上执行, ...

  8. HDOJ(HDU) 1985 Conversions(汇率转换)

    Problem Description Conversion between the metric and English measurement systems is relatively simp ...

  9. springMVC+ mongdb + redis +Jedis 环境搭建

    环境信息: JDK1.7 : Eclipse 4.4.1 ; mongdb + mongVUE:mongDB的安装 redis的下载和安装:window下安装redis maven3.0.5 新建ma ...

  10. Forward Proxy & Reverse Proxy | 正向代理 和 反向代理

    对请求和响应内容不做修改的转发的服务器,被称为代理服务器.代理服务器分为两种类型:正向代理 和 反向代理. 正向代理:面向互联网,从更广范围获取信息的代理. 反向代理:面向内部,一般用于某企业的网站的 ...