Submission #16516517


Source Code Expand

Copy
use proconio::input;
use proconio::marker::Chars;

fn main() {
    input! {
        _: usize,
        a: Chars,
        b: Chars,
        c: Chars,
    };
    let mut count = 0;
    for ((a_i, b_i), c_i) in a.iter().zip(b.iter()).zip(c.iter()) {
        if a_i == b_i && b_i == c_i {
            // do nothing
        } else if a_i == b_i || b_i == c_i || a_i == c_i {
            count += 1;
        } else {
            count += 2;
        }
    }
    let ans = count;
    println!("{}", ans);
}

Submission Info

Submission Time
Task B - Touitsu
User bouzuya
Language Rust (1.42.0)
Score 200
Code Size 498 Byte
Status AC
Exec Time 6 ms
Memory 2140 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 10
Set Name Test Cases
Sample a01, a02, a03
All a01, a02, a03, b04, b05, b06, b07, b08, b09, b10
Case Name Status Exec Time Memory
a01 AC 6 ms 2112 KB
a02 AC 2 ms 2056 KB
a03 AC 2 ms 2080 KB
b04 AC 1 ms 2048 KB
b05 AC 2 ms 1968 KB
b06 AC 2 ms 2120 KB
b07 AC 2 ms 2140 KB
b08 AC 2 ms 2132 KB
b09 AC 2 ms 2084 KB
b10 AC 1 ms 2080 KB