Problem:
Score : 100 points

Problem Statement

You are given three integers A, B and C.
Determine whether C is not less than A and not greater than B.

Constraints

-100≤A,B,C≤100

A, B and C are all integers.

Input

Input is given from Standard Input in the following format:

A B C

Output

If the condition is satisfied, print Yes; otherwise, print No.

Sample Input 1

1 3 2

Sample Output 1

Yes

C=2 is not less than A=1 and not greater than B=3, and thus the output should be Yes.

Sample Input 2

6 5 4

Sample Output 2

No

C=4 is less than A=6, and thus the output should be No.

Sample Input 3

2 2 2

Sample Output 3

Yes

Solution in PHP (5.6.30) (judge verdict: Wrong Answer)

<?php
 
fscanf(STDIN, "%d %d", $N, $M);
 
define('NMAX', 1000);
define('MMAX', 2000);
 
$a = array();
$b = array();
$c = array();
 
for ($i = 0; $i < $M; ++$i) {
    fscanf(STDIN, "%d %d %d", $a[$i], $b[$i], $c[$i]);
    $c[$i] = -$c[$i];
}
 
$dist = array();
 
for ($i = 0; $i < $N; ++$i) {
    $dist[$i] = PHP_INT_MAX;
}
 
$dist[0] = 0;
 
for ($loop = 0; $loop < $N - 1; ++$loop) {
    for ($i = 0; $i < $M; ++$i) {
 
        if ($dist[$a[$i] - 1] == PHP_INT_MAX) continue;
 
        if ($dist[$b[$i] - 1] > $dist[$a[$i] - 1] + $c[$i]) {
            $dist[$b[$i] - 1] = $dist[$a[$i] - 1] + $c[$i];
        }
    }
}
 
$ans = $dist[$N - 1];
 
$negative = array();
 
for ($i = 0; $i < $N; ++$i) {
    $negative[$i] = false;
}
 
for ($loop = 0; $loop < $N ; ++$loop) {
    for ($i = 0; $i < $M; ++$i) {
        if ($dist[$a[$i] - 1] == PHP_INT_MAX) continue;
 
        if ($dist[$b[$i] - 1] > $dist[$a[$i] - 1] + $c[$i]) {
            $dist[$b[$i] - 1] = $dist[$a[$i] - 1] + $c[$i];
            $negative[$b[$i] - 1] = true;
        }
 
        if ($negative[$a[$i] - 1] == true) {
            $negative[$b[$i] - 1] = true;
        }
    }
}
 
if ($negative[$N - 1]) {
    echo "inf" . PHP_EOL;
} else {
    echo -$ans . PHP_EOL;
}