結果

問題 No.2518 Adjacent Larger
ユーザー tassei903tassei903
提出日時 2023-10-27 22:19:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 81,888 KB
実行使用メモリ 117,376 KB
最終ジャッジ日時 2023-10-27 22:19:15
合計ジャッジ時間 3,674 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,576 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 57 ms
75,116 KB
testcase_12 AC 59 ms
75,132 KB
testcase_13 AC 54 ms
73,552 KB
testcase_14 AC 54 ms
73,544 KB
testcase_15 AC 57 ms
75,132 KB
testcase_16 AC 89 ms
112,872 KB
testcase_17 AC 73 ms
95,292 KB
testcase_18 AC 72 ms
95,304 KB
testcase_19 AC 63 ms
86,416 KB
testcase_20 AC 78 ms
100,512 KB
testcase_21 AC 89 ms
112,888 KB
testcase_22 AC 89 ms
112,888 KB
testcase_23 AC 90 ms
112,888 KB
testcase_24 AC 69 ms
95,792 KB
testcase_25 AC 69 ms
95,912 KB
testcase_26 AC 70 ms
95,912 KB
testcase_27 AC 91 ms
117,376 KB
testcase_28 AC 93 ms
117,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
for _ in range(ni()):
    n = ni()
    a = [x for x in na() if x != 1]
    if len(a) and (a == [[0,2][i%2] for i in range(len(a))] or a == [[2,0][i%2] for i in range(len(a))]):
        Yes()
    else:
        No()
0