結果

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

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
for d in range(1, 3):
    for i in range(n-d):
        if A[i] == A[i+d]:
            print("Yes")
            exit()
print("No")
0