結果
| 問題 | No.3155 Same Birthday |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2025-05-24 16:01:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 465 bytes |
| 記録 | |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 40,064 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-05-24 16:01:28 |
| 合計ジャッジ時間 | 8,137 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 WA * 1 RE * 47 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:25:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
25 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
main.cpp:29:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
29 | scanf("%d%d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~
ソースコード
/* -*- coding: utf-8 -*-
*
* 3155.cc: No.3155 Same Birthday - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
/* typedef */
/* global variables */
bool used[13][32];
/* 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