結果

問題 No.3286 Make a Happy Connection
ユーザー timi
提出日時 2025-10-03 21:30:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 53,844 KB
最終ジャッジ日時 2025-10-03 21:30:26
合計ジャッジ時間 2,403 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#K,Q=map(int, input().split())
N=int(input())
A=list(map(int, input().split()))

A.append(-1)
A.append(-2)
ans='No'
for i in range(N):
  if A[i]==A[i+1]:
    ans='Yes'
  if A[i]==A[i+2]:
    ans='Yes'
print(ans)
0