結果

問題 No.3155 Same Birthday
ユーザー it_is_a_pity_
提出日時 2025-05-23 19:01:35
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 635 bytes
コンパイル時間 4,588 ms
コンパイル使用メモリ 256,360 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2025-05-23 19:02:14
合計ジャッジ時間 8,394 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define all(v) v.begin(),v.end()
const ll INF = (ll)2e18;

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

    ll N;
    cin >> N;
    set<pair<ll, ll>> s;
    vector<ll> A(N), B(N);
    rep(i, N){
        cin >> A[i] >> B[i];
    }
    rep(i,N){
        if(s.count({A[i],B[i]})){
            cout << "Yes" << endl;
            return 0;
        }
        s.insert({A[i], B[i]});
    }
    cout << "No" << endl;
}
0