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 C (GCC 5.4.1) (judge verdict: Runtime Error)

#include<stdio.h>
#include<stdlib.h>

int compr(const void *ax, const void *ay){
	unsigned long *x = *(unsigned long **)ax;
	unsigned long *y = *(unsigned long **)ay;

	if(x[0] > y[0]) return 1;
	if(x[0] < y[0]) return -1;
	if(x[0] = y[0]) return 0;
}

unsigned long answer(unsigned int N, unsigned long long K, unsigned long *a, unsigned long *b){
	unsigned long **list, k = 0, rtn;
	unsigned int i;

	list  = (unsigned long **)malloc(sizeof(unsigned long *)*N);
	if(list == NULL) exit(1);
	for(i = 0; i < N; i++){
		list[i] = (unsigned long *)malloc(sizeof(unsigned long)*2);
		if(list[i] == NULL) exit(1);
		list[i][0] = a[i];
		list[i][1] = b[i];
	}

	qsort(list, N, sizeof(unsigned long *), compr);
	for(i = 0; i < N; i++){
		k += list[i][1];
			rtn = list[i][0];
		if(k >= K){
			break;
		}
	}
	
	for(i = 0; i < N; i++) free(list[i]);
	free(list);
	return rtn;
}

int main(){
	unsigned int N, i;
	unsigned long *a, *b;
	unsigned long long K;
	char line[16];

	fgets(line, 16, stdin);
	sscanf(line, "%ld %llu", &N, &K);

	a = (unsigned long *)malloc(sizeof(unsigned long)*N);
	b = (unsigned long *)malloc(sizeof(unsigned long)*N);
	if((a == NULL) || (b == NULL)) exit(1);

	for(i = 0; i < N; i++){
		fgets(line, 16, stdin);
		sscanf(line, "%lu %lu", &a[i], &b[i]);
	}

	printf("%lu\n", answer(N, K, a, b));

	free(a);
	free(b);
	return 0;
}