so i tried to solve this two problem and they both got WA test 2
here's the problems 2012-2013 Waterloo Local Contest, 13 October, 2012 :
so i want to know the main idea of the both gym problems if possible and what is the trick in the second test case ?
Here's the approach to the problem E:
Overview:
-Imagine if we remove one of the edges of length x from the given tetrahedron. Now we are left with two triangular faces with a common side as a hinge.
-Now try to find the lowerbound and upperbound for the edge you just removed using some trigonometry for each permutation of remaining five edges which make up two triangular faces.
-If x fits within lowerbound and upperbound of any permutation, print "YES" else print "NO".
Here's my code: