結果

問題 No.1183 コイン遊び
ユーザー phsplsphspls
提出日時 2020-09-05 15:04:42
言語 Rust
(1.77.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 596 bytes
コンパイル時間 762 ms
コンパイル使用メモリ 144,612 KB
実行使用メモリ 8,872 KB
最終ジャッジ日時 2023-08-19 02:37:09
合計ジャッジ時間 6,280 ms
ジャッジサーバーID
(参考情報)
judge14 / judge10
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 0 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 3 ms
4,380 KB
testcase_12 AC 21 ms
6,228 KB
testcase_13 AC 20 ms
5,844 KB
testcase_14 AC 31 ms
8,184 KB
testcase_15 AC 34 ms
8,872 KB
testcase_16 AC 34 ms
8,856 KB
testcase_17 AC 34 ms
8,860 KB
testcase_18 AC 33 ms
8,864 KB
testcase_19 AC 34 ms
8,856 KB
testcase_20 AC 33 ms
8,864 KB
testcase_21 AC 30 ms
8,864 KB
testcase_22 AC 29 ms
8,856 KB
testcase_23 AC 30 ms
8,816 KB
testcase_24 AC 29 ms
8,768 KB
testcase_25 AC 35 ms
8,840 KB
testcase_26 AC 34 ms
8,764 KB
testcase_27 AC 34 ms
8,808 KB
testcase_28 AC 34 ms
8,852 KB
testcase_29 AC 29 ms
8,812 KB
testcase_30 AC 30 ms
8,768 KB
testcase_31 AC 34 ms
8,812 KB
testcase_32 AC 33 ms
8,864 KB
testcase_33 AC 33 ms
8,772 KB
testcase_34 AC 34 ms
8,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let mut a = String::new();
    std::io::stdin().read_line(&mut a).ok();
    let a: Vec<u8> = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
    let mut b = String::new();
    std::io::stdin().read_line(&mut b).ok();
    let b: Vec<u8> = b.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();

    let mut diffs: Vec<bool> = a.iter().zip(b.iter()).map(|pair| pair.0 ^ pair.1 == 1u8).collect();
    diffs.dedup();
    println!("{}", diffs.iter().filter(|&i| *i).count());
}
0