咪咪的智慧 - 作业题
No testdata at current.
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
说明
咪咪是一只聪明的小老鼠,她正在四处找水喝呢…她发现了一些水罐,里面都有水。聪明的咪咪自然有办法:她转过身来,把尾巴放进去浸湿,再喝尾巴上的水就好了。我们已知每个水罐里水面到水罐口的距离,还知道咪咪的尾巴最多可以伸进水罐口t厘米。 假设尾巴够到就能浸湿,请你判断一下:有多少个水罐中的水可以被咪咪喝到?
输入格式
第一行为两个整数n(1<=n<=20)、t(10<=t<=20),分别表示水罐的数量和咪咪的尾巴可以够到的最大深度。之后一行中有n个用空格分开的整数,分别表示每个水罐中水面到水罐口的距离。
输出格式
只有一个整数,表示有多少个水罐中的水可以被咪咪喝到。
样例
5 10
8 7 13 5 12
3
P3阶段测试
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2026-3-14 13:15
- End at
- 2026-3-14 15:15
- Duration
- 2 hour(s)
- Host
- Partic.
- 9