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 Rust (1.15.1) (judge verdict: Runtime Error)

use std::io;

fn main() {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    let q_len = {
        let mut n_and_q = buf.split_whitespace();
        n_and_q.next().unwrap();
        n_and_q.next().unwrap().parse::<usize>().unwrap()
    };

    buf.clear();
    io::stdin().read_line(&mut buf).unwrap();
    buf.pop().unwrap();
    let s = buf;

    let mut spells = vec![String::new(); q_len];
    for spell in spells.iter_mut() {
        io::stdin().read_line(spell).unwrap();
    }

    let spells: Vec<_> = spells
        .into_iter()
        .map(|spell| {
            let mut iter = spell.split_whitespace();
            let t = iter.next().unwrap().chars().next().unwrap();
            let d = iter.next().unwrap().chars().next().unwrap();
            (t, d)
        })
        .collect();

    let mut indices = Vec::with_capacity(s.len());
    let mut golems = vec![1_u32; s.len()];
    for (t, d) in spells.into_iter() {
        for (i, s) in s.chars().enumerate() {
            if s == t { indices.push(i); }
        }

        for &index in indices.iter() {
            match d {
                'R' => {
                    if index != s.len() - 1 {
                        golems[index+1] += golems[index];
                    }
                    golems[index] = 0;
                }
                'L' => {
                    if index != 0 {
                        golems[index-1] += golems[index];
                    }
                    golems[index] = 0;
                }
                e @ _ => panic!("unexpected char '{}'", e),
            }
        }

        indices.clear();
    }

    println!("{}", golems.iter().sum::<u32>());
}