We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
<?php$handle=fopen("php://stdin","r");functionisSatisfiable($c1,$c2,$h1,$h2){// Complete this function$cmin=min($c1,$c2);$cmax=max($c1,$c2);$hmin=min($h1,$h2);$hmax=max($h1,$h2);if($cmin<=$hmin&&$cmin<=$hmax&&$cmax<=$hmin&&$cmax<=$hmax){if(($hmin-$cmin)>=0)return'YES';elsereturn'NO';}elsereturn'NO';}// Return "YES" if all four conditions can be satisfied, and "NO" otherwisefscanf($handle,"%d %d %d %d",$c1,$c2,$h1,$h2);$result=isSatisfiable($c1,$c2,$h1,$h2);echo$result."\n";?>
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hot and Cold
You are viewing a single comment's thread. Return to all comments →