Nabila is scaling server capacity for a school fair and wants the minimum capacity C such that all requests can be handled within a time limit, using binary search on the answer.
What your program reads
Line1: N T. Line2: N request loads.
What your program prints
Minimum feasible capacity C.
Limits
1 ≤ N ≤ 10^5
Example input
4 10 3 5 2 6
Expected output
6
main.c
Your work is saved in this browser as you type.
Loading editor…
Input for Run
Run tries your code on the input above and shows what it prints. Submit checks your output against every test, including hidden ones.
Shortcut: Ctrl + Enter sends it to the judge.