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 <stdio.h>
 
int main(){
  int n, q;
  scanf("%d%d", &n, &q);
  char s[200001];
  scanf("%s", s);
  char t[200001], d[200001];
  for(int i=0; i<q; i++){
    scanf(" %c %c", &t[i], &d[i]);
  }
 
  /* 改良 */
  int count=0;
  int count2=0;
  int r=n-1;
 
  /* 呪文の実行 */
  for(int i=q-1;i>=0;i--){
    if(d[i] == 'R'){
      if (s[count-1] == t[i]) {
        count--;
      }
      if(s[r] == t[i]){
        r--;
      }
    }else if(d[i] == 'L'){
      if(s[r+1] == t[i]) {
        r++;
      }
      if(s[count] == t[i]) {
        count++;
      }
    }
  }
 
  if(r < 1){
    count2 = 0;
  }else{
    count2 = r-count+1;
  }
 
  printf("%d\n",count2);
  return 0;
}