結果
問題 |
No.3155 Same Birthday
|
ユーザー |
![]() |
提出日時 | 2025-05-23 19:14:21 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 110 ms / 2,000 ms |
コード長 | 368 bytes |
コンパイル時間 | 1,214 ms |
コンパイル使用メモリ | 97,792 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-05-23 19:14:30 |
合計ジャッジ時間 | 5,267 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 49 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<int> flag(1000000); for (int i = 0; i < n; ++i) { int a, b; cin >> a >> b; --a, --b; a = a * 1000 + b; if (flag[a]) { cout << "Yes" << endl; return 0; } flag[a] = 1; } cout << "No" << endl; }