Search
 
SCRIPT & CODE EXAMPLE
 

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;
}
Comment

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;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ terinary operator 
Cpp :: ordine crescente di numeri indefiniti in c++ 
Cpp :: qpushbutton clicked connect c++ 
Cpp :: and condtion c++ 
Cpp :: dinamic 
Cpp :: delete item from linked list in c++ 
Cpp :: how to point to next array using pointer c++ 
Cpp :: cpp class access array member by different name 
Cpp :: c++ click event 
Cpp :: c++ map change order 
Cpp :: C++ Converting Celsius to Kelvin 
Cpp :: c++ arrays 
Cpp :: Corong_ExerciseNo3(1) 
Cpp :: cocos2d c++ linux 
Cpp :: c++ str 
Cpp :: MPI_PUT 
Cpp :: c++ program to convert time in seconds to hours minutes and seconds 
Cpp :: c++ first index 0 or 1 
Cpp :: 136. Single Number leetcode solution in c++ 
Cpp :: find the number of digits of a given integer n . 
Cpp :: C++ operation 
Cpp :: 378. Kth Smallest Element in a Sorted Matrix using binary search 
Cpp :: test3 
Cpp :: why do men drink liquor 
Cpp :: 10011101 
Cpp :: deadlock detection in c++coding ninjas 
Cpp :: ++i v.s i++ 
Cpp :: c++ power operator 
Cpp :: (/~/+|/+$/g, ') 
Cpp :: how to analyse a poem 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =