結果
| 問題 | No.3155 Same Birthday | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-05-07 13:22:10 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 104 ms / 2,000 ms | 
| コード長 | 1,013 bytes | 
| コンパイル時間 | 5,752 ms | 
| コンパイル使用メモリ | 333,424 KB | 
| 実行使用メモリ | 11,264 KB | 
| 最終ジャッジ日時 | 2025-05-13 17:52:42 | 
| 合計ジャッジ時間 | 9,680 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 49 | 
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define ll long long
#define ld long double
#define out(x) cout<<x<<'\n'
#define all(v) v.begin(),v.end()
#define rep(i,n) for(int i=0;i<(ll)(n);i++)
template<class T> inline bool chmin(T& a, T b) {if(a > b){a = b; return true;} else {return false;}};
template<class T> inline bool chmax(T& a, T b) {if(a < b){a = b; return true;} else {return false;}};
const ll INF=(1LL<<60);
const ll mod=998244353;
using Graph = vector<vector<ll>>;
using Network = vector<vector<pair<ll,ll>>>;
using Grid = vector<string>;
const vector<ll> dx = {0, 1, 0, -1};
const vector<ll> dy = {1, 0, -1, 0};
int main() {
    ll N;cin>>N;
    vector<vector<ll>> A(1000, vector<ll>(1000, 0));
    rep(i, N) {
        ll a, b;cin>>a>>b;a--, b--;
        A[a][b]++;
    }
    rep(i, 1000) {
        rep(j, 1000) {
            if (A[i][j] > 1) {
                out("Yes");
                return 0;
            }
        }
    }
    out("No");
}
            
            
            
        