結果

問題 No.3155 Same Birthday
ユーザー Guran08
提出日時 2025-05-23 19:01:35
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 867 bytes
コンパイル時間 5,458 ms
コンパイル使用メモリ 332,288 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2025-05-23 19:02:16
合計ジャッジ時間 13,875 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
//using mint = modint1000000007;
typedef long long ll;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> T;
template<typename T>bool chmax(T& a, const T& b) { if (a < b) { a = b;return true; } else { return false; } }
template<typename T>bool chmin(T& a, const T& b) { if (a > b) { a = b;return true; } else { return false; } }

const int di[] = { -1,0,1,0 };
const int dj[] = { 0,-1,0,1 };
const long long INF = 9223372036854775807;
const int inf = 1001001001;


int main(void) {
    int n; cin >> n;
    set<P> 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";
}
//overflow,out_of_range
0