• [1611] Honor Life

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • We don't write code, we just move the code. Today, Alex plans to move bricks, there are n bricks, the weight of ith brick is ai. Unfortunately, Alex can only carry bricks which weight is no more than k, now he wants to know the total number of bricks which he can move?
  • 输入
  • For each test case, first line contains two integers n and k (1 <= n <= 10000, 1 <= k <= 1000000000), the second line contains n integers ai(1 <= ai <= 1000000000).
  • 输出
  • For each test case, print your answer.
  • 样例输入
  • 4 3
    1 2 3 4
    5 10
    1 3 17 4 2
  • 样例输出
  • 3
    4
  • 提示
  • 来源
  • 本站或者转载
  • 操作

显示春菜