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. laravel框架——表单验证

    创建路由 Route::get('test','VerController@index'); Route::post('tosubmit','VerController@tosubmit'); 在控制 ...

  2. Egret 文本处理

    常规处理: private createGameScene():void { var shp = new egret.Shape(); shp.graphics.beginFill(0xff0000, ...

  3. C# 基于委托的事件

    事件基于多播委托的特性. 多播委托事实上就是一组类型安全的函数指针管理器,调用则执行顺序跳转到数组里所有的函数指针里执行. class Program { public class CarInfoEv ...

  4. 在同个工程中使用 Swift 和 Objective-C(Swift 2.0更新)-b

    本节包含内容: Mix and Match 概述(Mix and Match Overview) 在同个应用的 target 中导入(Importing Code from Within the Sa ...

  5. windows10 预览版 中英文官方下载地址+激活密钥+网盘分享

    windows10 预览版 中英文官方下载地址+激活密钥+网盘分享 产品密钥:NKJFK-GPHP7-G8C3J-P6JXR-HQRJR 英语 64 位 (x64)  http://iso.esd.m ...

  6. mschedule 简单linux进程管理(树莓派)

    树莓派是神奇的机器,CPU和内存都少的可怜,但体积小功耗低,在上面搞些动搞些西其实也挺有意思,挺好玩的.装的是pidara,基本服务没有精简多少,先cat一下CPU和RAM. [able@raspi ...

  7. LINQ to SQL 建立实体类

    使用LINQ to SQL时,需要首先建立用于映射数据库对象的模型,也就是实体类.在运行时,LINQ to SQL 根据LINQ表达式或查询运算符生成SQL语句,发送到数据库进行操作.数据库返回后,L ...

  8. SCALA中类的继承

    慢慢的,回想起以前学习JAVA和C#当中的的类的特性了. 感觉大同小异吧... package com.hengheng.scala class OOPInScala { } class Studen ...

  9. Path Sum II——LeetCode

    Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given su ...

  10. i++ ++i的原子性

    http://bbs.chinaunix.net/thread-1794304-1-1.html http://blog.csdn.net/sapair/article/details/4243974 ...