結果
問題 | No.2518 Adjacent Larger |
ユーザー | akebono03 |
提出日時 | 2023-10-27 22:28:17 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 499 bytes |
コンパイル時間 | 264 ms |
コンパイル使用メモリ | 81,880 KB |
実行使用メモリ | 101,896 KB |
最終ジャッジ日時 | 2023-10-27 22:28:21 |
合計ジャッジ時間 | 4,112 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
55,512 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 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 80 ms
101,344 KB |
testcase_17 | AC | 65 ms
84,736 KB |
testcase_18 | AC | 65 ms
84,764 KB |
testcase_19 | AC | 62 ms
82,792 KB |
testcase_20 | AC | 73 ms
91,256 KB |
testcase_21 | AC | 74 ms
97,796 KB |
testcase_22 | AC | 75 ms
97,796 KB |
testcase_23 | AC | 84 ms
101,896 KB |
testcase_24 | AC | 80 ms
100,436 KB |
testcase_25 | AC | 79 ms
101,040 KB |
testcase_26 | AC | 79 ms
101,032 KB |
testcase_27 | AC | 76 ms
100,300 KB |
testcase_28 | AC | 81 ms
101,184 KB |
ソースコード
def ip():return int(input()) def mp():return map(int, input().split()) def lmp():return list(map(int, input().split())) T = ip() from collections import defaultdict def solve(): N = ip() A = lmp() cnt = defaultdict(int) cnt[A[0]] = 1 for i in range(1, N): cnt[A[i]] += 1 if A[i] != 1 and A[i] == A[i-1]: print('No') return if cnt[0] == 0 or cnt[2] == 0: print('No') else: print('Yes') for _ in range(T): solve()