結果
| 問題 | No.3155 Same Birthday | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-05-23 20:02:39 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 40 ms / 2,000 ms | 
| コード長 | 373 bytes | 
| コンパイル時間 | 11,320 ms | 
| コンパイル使用メモリ | 400,176 KB | 
| 実行使用メモリ | 13,240 KB | 
| 最終ジャッジ日時 | 2025-09-16 08:34:11 | 
| 合計ジャッジ時間 | 16,310 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 49 | 
ソースコード
use std::collections::HashSet;
use proconio::input;
fn main() {
    input! {
        n: usize,
        ab: [(i64, i64); n],
    }
    let mut set = HashSet::new();
    for i in 0..n {
        let (ai, bi) = ab[i];
        if set.contains(&(ai, bi)) {
            println!("Yes");
            return;
        }
        set.insert((ai, bi));
    }
    println!("No");
}
            
            
            
        