Winning CB Scholarship Please help

#include
using namespace std;
#define ll long long int

bool solve(ll n,ll m,ll x,ll y,ll mid)
{

return(n*x<=m+(n-mid)*y);

}

int main() {

ll n,m,x,y;

cin>>n>>m>>x>>y;

int s=0;
int e=n;
int ans=0;

while(s<=e)
{
	int mid=(s+e)/2;
	if(solve(n,m,x,y,mid))
	{
		ans=mid;
		s=mid+1;
	}

	else
	{
		e=mid-1;
	}
}

cout<<ans;

return 0;

}

Use long for n,m,x,y not int

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.