結果

問題 No.3155 Same Birthday
ユーザー GOTKAKO
提出日時 2025-05-23 20:52:29
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 195 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 2,001 ms
コンパイル使用メモリ 199,804 KB
実行使用メモリ 13,056 KB
最終ジャッジ日時 2025-05-23 20:52:38
合計ジャッジ時間 7,770 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

    int N; cin >> N;
    set<pair<int,int>> AB;
    while(N--){
        int a,b; cin >> a >> b;
        if(AB.count({a,b})){cout << "Yes\n"; return 0;}
        AB.insert({a,b});
    }
    cout << "No\n";
}
0