結果

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

ソースコード

diff #

#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
//https://boostjp.github.io/tips/multiprec-int.html

#define YES cout<<"Yes"<<endl
#define NO cout<<"No"<<endl
#define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}// if(a==b)YN;
#define NO2 cout<<-1<<endl

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i=int(n)-1; i>=0; --i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()

int main() {
    int N;
    cin >> N;
    set<pair<int, int>> st;
    rep(i, N) {
        int a, b;
        cin >> a >> b;
        if (st.count({a, b})) {
            YES;
            return 0;
        }
        st.insert({a, b});
    }
    NO;
}
0