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

import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		long K = sc.nextInt();

		ArrayManager am = new ArrayManager();

		for(int i = 0; i < N; i++){
			int a = sc.nextInt();
			int b = sc.nextInt();
			am.insert(a, b);
		}
		sc.close();

		System.out.println(am.getKthSmallestNumber(K));
	}

}

class ArrayManager{
	private TreeMap<Integer, Long> map;

	ArrayManager(){
		map = new TreeMap<Integer, Long>();
	}

	void insert(int a, int b){
		//既に挿入済みの値ならbだけ増加
		if(map.containsKey(a)){
			map.put(a, map.get(a) + b);
		}
		//初めて挿入
		else{
			map.put(a, (long)b);
		}
	}

	//k番目に小さい数を返す
	int getKthSmallestNumber(long k){
		int ret; //探索済みの最大値
		long cur = 0; //探索済みのインデックス
		for(Entry<Integer, Long> e: map.entrySet()){
			ret = e.getKey();
			cur += e.getValue();
			if(cur >= k){
				return ret;
			}
		}
		return -1;
	}
}