AlgoUniversity
  • Go Back
Discussion
Max Frequency :

Author

Akshay Sharma

Difficulty Level : Medium

Submissions : 526

Asked In : PhonePe

Marks :100

: 22 | : 0

Bob has an array of integers arr of size n and an integer x. Alice asks him to perform a few operations on the array. In one operation Bob can choose any index and increment the element at that index by 1. He can perform at most x operations.

Alice is curious and wants to know what could be the maximum occurrence of any element of the array after performing at most x such operation.

Alex is too lazy to perform the task, can you help him find the answer so that he could impress Alice?

Input

The first line contains integer n and X ($$$ 0 \le n \le x \le 10^5$$$).

The second line contains n spaces separated by integers ($$$0 \le a_i \le 10^5$$$)

Output

Print the maximum occurence of the element in the array

Examples

Input
4 5 
1 4 8 13 
Output
2
Input
5 10
0 8 4 2 10
Output
3

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.