結果

問題 No.3155 Same Birthday
ユーザー akkey
提出日時 2025-05-23 19:10:33
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 356 bytes
コンパイル時間 12,735 ms
コンパイル使用メモリ 392,732 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2025-05-23 19:10:57
合計ジャッジ時間 14,455 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;
use std::collections::HashMap;
fn main() {
    input! {
        n: usize,
        ab: [(usize, usize); n],
    }
    let mut counts = HashMap::new();
    for ab in ab {
        *counts.entry(ab).or_insert(0) += 1;
    }
    if counts.values().any(|c| *c > 1) {
        println!("Yes");
    }
    else {
        println!("No");
    }
}
0