結果
| 問題 | No.3286 Make a Happy Connection |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-19 22:35:42 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 2,000 ms |
| + 420µs | |
| コード長 | 247 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 95,724 KB |
| 実行使用メモリ | 78,720 KB |
| 最終ジャッジ日時 | 2026-07-15 19:24:19 |
| 合計ジャッジ時間 | 3,827 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
n = int(input())
a = [int(x) for x in input().split()]
fl = False
for i in range(n-1):
if a[i] == a[i+1]:
fl = True
if 0 < i and a[i-1] == a[i+1]:
fl = True
if i < n-2 and a[i] == a[i+2]:
fl = True
if fl:
print("Yes")
else:
print("No")