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++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include<iostream>
#include<math.h>
#include<vector>

using namespace std;


int main(){
	int N,Q;
	cin>>N>>Q;
	int flag[N+2],flag_new[N+2];
	for(int i=0;i<N+2;i++){flag_new[i]=1.0;}
	string s;
	cin>>s;
	string t,d;


	int dir;
	for(int i=0;i<Q;i++){
		flag_new[0]=0.0;
		flag_new[N+1]=0.0;
		for(int k=0;k<N+2;k++){flag[k]=flag_new[k];}
		cin>>t>>d;
		if(d[0]=='L'){
			dir=-1;
		}else{
			dir=1;
		}
		for(int k=0;k<N;k++){
			if(s[k]==t[0]){
				flag_new[k+1+dir]+=flag[k+1];
				flag_new[k+1]-=flag[k+1];
			}
		}

	}
	int sur=0;
	for(int i=1;i<=N;i++){
		sur+=flag_new[i];
	}
	cout<<sur<<endl;
	
	return 0;

}