結果
| 問題 |
No.3286 Make a Happy Connection
|
| コンテスト | |
| ユーザー |
かみのさちほ
|
| 提出日時 | 2025-10-18 00:47:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 298 bytes |
| コンパイル時間 | 362 ms |
| コンパイル使用メモリ | 82,456 KB |
| 実行使用メモリ | 54,000 KB |
| 最終ジャッジ日時 | 2025-10-18 00:47:17 |
| 合計ジャッジ時間 | 2,807 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
N = int(input())
a_list = list(map(int, input().split()))
is_true = False
for n in range(N - 1):
if n == N - 2:
if a_list[n] == a_list[n + 1]:
is_true = True
else:
if a_list[n] == a_list[n + 1] or a_list[n] == a_list[n + 2]:
is_true = True
if is_true:
print("Yes")
else:
print("No")
かみのさちほ