結果

問題 No.3155 Same Birthday
ユーザー twins_fuyu
提出日時 2025-05-23 19:18:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 261 ms / 2,000 ms
コード長 425 bytes
コンパイル時間 1,861 ms
コンパイル使用メモリ 204,192 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2025-05-23 19:19:03
合計ジャッジ時間 7,900 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using ll = long long;

vector<tuple<ll,ll,ll,ll>> APBQ;
vector<map<ll,ll>> memo;

ll N;
set<pair<ll,ll>> AB;
int main(){
    cin >> N;
    for (int i=0; i < N; i++){
        pair<ll,ll> ab;
        cin >> ab.first >> ab.second;
        if (AB.count(ab)){
            cout << "Yes" << endl;
            return 0;
        }
        AB.insert(ab);
    }
    cout << "No" << endl;
}
0