import java.util.Scanner;
class Codechef
{
public static void main (String[] args)
{
// create a scanner
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0)
{
int u = sc.nextInt();
int v = sc.nextInt();
int a = sc.nextInt();
int s = sc.nextInt();
System.out.println((Math.pow(v, 2) >= Math.pow(u, 2) - 2 * a * s) ? "YES" : "NO");
}
}
}
**Status:** Time Limit Exceeded.
For me, it worked fine @anon47473735, just I’ve faced a compilation error and solved that by adding
import java.util.Scanner;
Can you please either provide constraints or the complete question?
The time limit is 0.5 secs.
Can you also please mention the constraints?