For this Question: To enter Todo's amusement park, there are M counters. Total N people want to enter the amusement park, each of whom will line up in front of one of the counters. Any counter worker gets angry if the number of people lining up in front of him is at least 2 more than the number of people lining up in front of any of its neighbouring counters. The worker at the K-th counter works the fastest. 
Find the maximum number of people that can line up in front of the K-th counter such that each counter gets at least one person and no counter worker is angry.Input contains three integers M, N and K.

Constraints:
1 <= N <= 1000000000
1 <= M <= N
1 <= K <= MPrint the maximum number of people that can line up in front of the Kth counter such that each counter gets at least one person and no counter worker is angry.Sample Input 1
3 3 1

Sample Output 1
1

Explanation: Optimal Arrangement is 1 1 1.

Sample Input 2
3 6 1

Sample Output
3

Explanation: Optimal Arrangement is 3 2 1., I have written this Solution Code: #pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define VV vector
#define pb push_back
#define bitc  __builtin_popcountll
#define m_p make_pair
#define infi 1e18+1
#define eps 0.000000000001
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class T>//usage rand<long long>()
T rand() {
    return uniform_int_distribution<T>()(rng);
}
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template<class T>
using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();
 
//////////////

typedef unsigned long long ull;
auto clk=clock();
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define sz(x) ((long long)x.size())
#define int long long  
#define f80 __float128
#define pii pair<int,int>
/////////////

ll get(ll ed, ll cnt){
	ll d = cnt;
	if (d > ed) d = ed;
	cnt -= d;
	
	return cnt + d * (2 * ed - d + 1) / 2;
}
 
signed main(){
	#ifdef ANIKET_GOYAL
		freopen("inputf.in","r",stdin);
		freopen("outputf.in","w",stdout);
	#endif
	ll n, p, k; cin >> n >> p >> k;
	ll l = 1, r = 1e9 + 10;
 
	while(l + 1 < r){
		ll m = (l + r) / 2;
 
		if ( ull(get(m, k)) + get(m, n - k + 1) - m > p)
			r = m;
		else l = m;
	}
 
	cout << l << endl;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?