結果
| 問題 | No.3155 Same Birthday |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-23 20:02:39 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| + 530µs | |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 1,152 ms |
| コンパイル使用メモリ | 190,064 KB |
| 実行使用メモリ | 11,968 KB |
| 最終ジャッジ日時 | 2026-07-15 02:29:49 |
| 合計ジャッジ時間 | 5,522 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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");
}