結果
| 問題 | No.3155 Same Birthday |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2025-05-24 16:03:06 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 68 ms / 2,000 ms |
| + 935µs | |
| コード長 | 528 bytes |
| 記録 | |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 50,512 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-11 01:45:16 |
| 合計ジャッジ時間 | 3,077 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 49 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 3155.cc: No.3155 Same Birthday - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_A = 1000;
const int MAX_B = 1000;
/* typedef */
/* global variables */
bool used[MAX_A + 1][MAX_B + 1];
/* subroutines */
/* main */
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
int a, b;
scanf("%d%d", &a, &b);
if (used[a][b]) { puts("Yes"); return 0; }
used[a][b] = true;
}
puts("No");
return 0;
}
tnakao0123