Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

turn it codechef solution in c++

/*
   problem link: https://www.codechef.com/LP1TO201/problems/NFS
*/

#include<iostream>
#include<cmath>
#define ll long long
#include<vector>
#include<stack>
#include<string>
#include<algorithm>
using namespace std;

void solve()
{
	ll u, v, a, s;
	cin >> u >> v >> a >> s;
	ll ans = (u * u) - (2 * a * s);
	(ans <= (v * v)) ? cout << "Yes
" : cout << "No
";
}

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		solve();
	}
	return 0;
}
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #turn #codechef #solution
ADD COMMENT
Topic
Name
3+9 =