結果

問題 No.3155 Same Birthday
ユーザー karinohito
提出日時 2025-05-24 16:47:29
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 3,016 ms
コンパイル使用メモリ 280,572 KB
実行使用メモリ 13,184 KB
最終ジャッジ日時 2025-05-24 16:47:37
合計ジャッジ時間 8,092 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

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


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

	ll N;
	cin>>N;
	set<ll> S;
	for(int i=0;i<N;i++){
		ll A,B;
		cin>>A>>B;
		if(S.count(A*10000+B)){
			cout<<"Yes"<<endl;
			return 0;
		}
		S.insert(A*10000+B);
	}
	cout<<"No"<<endl;
	
}
0