Problem:
Score : 100 points

Problem Statement

You are given three integers A, B and C.

Determine if there exists an equilateral triangle whose sides have lengths A, B and C.

Constraints

All values in input are integers.

1 \leq A,B,C \leq 100

Input

Input is given from Standard Input in the following format:

A B C

Output

If there exists an equilateral triangle whose sides have lengths A, B and C, print Yes; otherwise, print No.

Sample Input 1

2 2 2

Sample Output 1

Yes

There exists an equilateral triangle whose sides have lengths 2, 2 and 2.

Sample Input 2

3 4 5

Sample Output 2

No

There is no equilateral triangle whose sides have lengths 3, 4 and 5.

Solution in C (GCC 5.4.1) (judge verdict: Wrong Answer)

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

int main(void) {
	int i;
	int j;
	int N;//マスの数
	char* s;//各マスの文字
	int Q;//呪文の回数
	char* t;//Left or Rightの呪文
	char* d;//呪文が通じるマスの文字
	scanf("%d %d", &N, &Q);
	s = (char *)malloc(sizeof(char) * N);
	t = (char *)malloc(sizeof(char) * Q);
	d = (char *)malloc(sizeof(char) * Q);
	scanf("%s", s);
	int* G;//各ゴーレムのマス
	G = (int *)malloc(sizeof(int) * N);
	for (i = 0; i < N; i++) {
		G[i] = 1;
	}
	int count;
	count = N;
	for (i = 0; i < Q; i++) {
		scanf("\n%c %c ", &d[i], &t[i]);
		if (t[i] == 'L') {
			for (j = 0; j < N; j++) {//マスの数ループ
				if (s[j] == d[i]) {
					if (G[j] == 0) {
						count--;
					}
					else {
						G[j] -= 1;
					}
					G[j] = 0;
				}
			}
		}
		else {
			for (j = 0; j < N; j++) {
				if (s[j] == d[i]) {
					if (G[j] == N - 1) {
						count--;
					}
					else {
						G[j + 1] += 1;
					}
					G[j] = 0;
				}
			}
		}
	}
	printf("%d", count);
}