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 Java (OpenJDK 11.0.6) (judge verdict: Runtime Error)

import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt(), m = scanner.nextInt();
			Path[] paths = new Path[m];
			IntStream.range(0, m).forEach(
					// 最長距離を計算するため、距離をマイナスにする
					i -> paths[i] = new Path(scanner.nextInt() - 1, scanner.nextInt() - 1, -scanner.nextLong()));
			long[] distances = new long[n];
			if (bellmanFord(paths, 0, n, distances)) {
				System.out.println("inf");
			} else {
				System.out.println(-distances[n - 1]);
			}
		}
	}

	/**
	 * https://www.geeksforgeeks.org/bellman-ford-algorithm-dp-23/ を参考に作成
	 * 
	 * @param paths     ノード間の連結パス一覧の配列
	 * @param src       開始ノード
	 * @param n         ノードの数
	 * @param distances 開始ノードから各ノードへの最短距離の配列
	 * @return グラフにはループが含まれているかどうか
	 */
	private static boolean bellmanFord(final Path[] paths, final int src, final int n, final long[] distances) {
		Arrays.fill(distances, Long.MAX_VALUE);
		distances[src] = 0;

		IntStream.range(1, n).forEach(i -> IntStream.range(0, paths.length).forEach(j -> {
			int from = paths[j].from, to = paths[j].to;
			long cost = paths[j].cost;
			if (distances[from] != Long.MAX_VALUE && distances[from] + cost < distances[to]) {
				distances[to] = distances[from] + cost;
			}
		}));

		// マイナスのループが含まれているかどうかを判定
		// 解説に参考して作成
		boolean[] negative = new boolean[n];
		Arrays.fill(negative, false);
		IntStream.range(0, n).forEach(i -> IntStream.range(0, paths.length).forEach(j -> {
			int from = paths[j].from, to = paths[j].to;
			if (distances[from] != Long.MAX_VALUE && distances[from] + paths[j].cost < distances[to]) {
				distances[to] = distances[from] + paths[j].cost;
				negative[to] = true;
			}
			if (negative[from]) {
				negative[to] = true;
			}
		}));
		return negative[n - 1];
	}

	/**
	 * ノード間の一つのパスを表すクラス
	 */
	private static class Path implements Comparable<Path> {
		/** 開始ノード */
		int from;
		/** 終了ノード */
		int to;
		/** 移動コスト */
		long cost;

		Path(int from, int to, long cost) {
			super();
			this.from = from;
			this.to = to;
			this.cost = cost;
		}

		@Override
		public int compareTo(Path path) {
			long costDiff = this.cost - path.cost;
			return (costDiff > 0) ? 1 : (costDiff < 0) ? -1 : 0;
		}
	}
}