F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

机器人的旅行

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 335    Accepted Submission(s): 177


Problem Description
一天机器人小A在做HDOJ的2217这个题目,题目的描述是一个喜欢旅行的人类一条成直线的旅行线路上旅行,这条旅行线路上有N(1<=N<=2000)个旅行点分别座落在x1,x2,...,xN(-100,000<=xi<=100,000)上,然后这个人类从x=0处出发,他每走1单位的距离耗时1分钟,他想知道用T(1<=T<=200000)分钟他最多能到达过多少个旅行点。作为机器人的的小A觉得自己有充足的体能可以让旅行点更多(1<=N<=100000),这些旅行点坐落的更分散(xi在int范围)以及更长的时间(T在int范围),在这些条件下他想知道他能最多到达多少个旅行点。
 

Input
The input contains several test cases .Each test case starts with two number N and T which indicate the number of places and the time respectively. Then N lines follows, each line has a number xi indicate the position of i-th place.
 

Output
For each test case, you should print the number of places,Wangye could visit at most, in one line.
 

Sample Input
5 16 -3 -7 1 10 8
 

Sample Output
4
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-12 01:52:20, Gzip enabled