結果
問題 |
No.2343 (l+r)/2
|
ユーザー |
|
提出日時 | 2023-06-09 21:25:56 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 411 bytes |
コンパイル時間 | 235 ms |
コンパイル使用メモリ | 82,252 KB |
実行使用メモリ | 86,668 KB |
最終ジャッジ日時 | 2025-01-02 02:14:31 |
合計ジャッジ時間 | 2,412 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 6 WA * 8 |
ソースコード
for _ in range(int(input())): n = int(input()) A = list(map(int, input().split())) B = [A[0]] for i in range(1, n): if A[i] == A[i - 1]: continue B.append(A[i]) if B[0] == 1: if len(B) == 1: print("No") else: print("Yes") else: if len(B) % 2 == 0: print("Yes") else: print("No")