結果

問題 No.3155 Same Birthday
コンテスト
ユーザー nhtloc
提出日時 2025-11-28 15:11:47
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 189 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 1,825 ms
コンパイル使用メモリ 199,796 KB
実行使用メモリ 13,184 KB
最終ジャッジ日時 2025-11-28 15:11:58
合計ジャッジ時間 10,470 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int N;
    cin >> N;
    set<pair<int,int>> s;

    bool ok = false;
    for (int i = 0; i < N; i++) {
        int a, b;
        cin >> a >> b;
        if (s.count({a, b})) ok = true;
        s.insert({a, b});
    }

    cout << (ok ? "Yes" : "No") << "\n";
    return 0;
}
0