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 Python (3.4.3) (judge verdict: Runtime Error)

# -*- coding: utf-8 -*-

import sys
import os
import math

N, M = map(int, input().split())
#print('N', N)
#print('M', M)

A = [[] for i in range(N)]
for i in range(M):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    A[a].append((b, -c))

# 始点から到達不可能な頂点は除去する
visited = [False] * N
Q = [0]
while Q:
    i = Q.pop(0)
    visited[i] = True
    for edge in A[i]:
        to = edge[0]
        if not visited[to]:
            Q.append(to)
# 到達不可能な頂点
unreachable = []
reachable = []
for i in range(N):
    if visited[i]:
        reachable.append(i)
    else:
        unreachable.append(i)
#print('unreach', unreachable)
for i in unreachable:
    A[i] = []

dists = [float('inf')] * N
dists[0] = 0
def bellman_ford(A):
    for i in reachable:
        for v in reachable:
            for edge in A[v]:
                to = edge[0]
                cost = edge[1]
                if dists[v] != float('inf') and dists[to] > dists[v] + cost:
                    dists[to] = dists[v] + cost
                    if i == N - 1:
                        return True
    return False

is_loop = bellman_ford(A)

if is_loop:
    print('inf')
else:
    # パスがある
    print(-dists[N-1])