結果

問題 No.2343 (l+r)/2
ユーザー 👑 rin204rin204
提出日時 2024-01-02 20:56:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 88,332 KB
最終ジャッジ日時 2024-01-02 20:56:09
合計ジャッジ時間 2,604 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,460 KB
testcase_01 AC 584 ms
76,868 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 75 ms
75,868 KB
testcase_05 AC 42 ms
64,816 KB
testcase_06 AC 41 ms
63,672 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 53 ms
78,100 KB
testcase_13 AC 48 ms
70,492 KB
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    n = int(input())
    A = list(map(int, input().split()))
    for _ in range(2):
        while len(A) >= 2 and A[-1] == A[-2]:
            A.pop()
        A = A[::-1]

    if len(A) >= 7:
        print("Yes")
    elif any(A[i] == A[i + 1] for i in range(len(A) - 1)):
        print("Yes")
    else:
        print("No")
0