結果

問題 No.3155 Same Birthday
ユーザー Ponzu
提出日時 2025-05-29 19:54:13
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 263 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 847 ms
コンパイル使用メモリ 98,580 KB
実行使用メモリ 12,928 KB
最終ジャッジ日時 2025-05-29 19:54:25
合計ジャッジ時間 11,487 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<set>
using namespace std;
using P = pair<int,int>;

int main(){
	int N;cin>>N;
	set<P> s;
	bool ans = false;
	for(int i=0;i<N;++i){
		int a,b;cin>>a>>b;
		if(s.contains(P(a,b))){
			ans = true;
		}
		s.emplace(a,b);
	}

	cout << (ans ? "Yes" : "No") << endl;
	
}
0