For this Question: Newton's garden has N apple trees. Initially, there are A<sub>i</sub> apples attached to the ith tree. Also, there are M apples which newton has to attach to these tress for testing gravity laws.

In one minute, at most B<sub>i</sub> apples fall from the ith tree.

Help newton find the minimum time he has to wait after which he can safely sit under any apple tree.The first line contains two space-separated integers – N and M indicating the number of apple trees and the number of apples to be attached.
Each of the next N lines contains two integers A<sub>i</sub> and B<sub>i</sub> specifying the initial count of apples and rate of fall of apples per minute for ith tree.

<b> Constraints: </b>
1 <= N <= 2*10<sup>5</sup>
0 <= A<sub>i</sub> <= 10<sup>6</sup>
1 <= M, B<sub>i</sub> <= 10<sup>6</sup>Output minimum time Newton has to waitInput:
3 6
4 3
7 4
1 5

Output:
2

Explanation:
Attach 2, 1, 3 apples to 1st, 2nd, 3rd tree respectively. Then, 2, 2, 1 minutes are required for all apples to fall from 1st, 2nd, 3rd tree respectively. So, Wait time is max(2, 2, 1) = 2., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

typedef long long int ll;

const int N = 2*1e5+5;

ll n,m;
vector<ll> a(N),b(N);

bool possible(ll time) {
    ll lim = 0;
    for(int i=0 ; i<n ; i++) lim += b[i] * time;
    ll tot = m;
    for(int i=0 ; i<n ; i++) tot += a[i];
    if (tot > lim) return false;
    for(int i=0 ; i<n ; i++) if (a[i] > b[i]*time) return false;
    return true;
}

int main(){
	cin >> n >> m;
	for(int i=0 ; i<n ; i++){
		cin >> a[i] >> b[i];
	}
	ll lo = 1, hi = 2*1e6+1000;
	while(hi - lo > 1) {
		ll mid = (hi+lo)/2;
		if (possible(mid)){
			hi = mid;
		}else{
			lo = mid;
		}
	}
	cout << hi << endl;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?