結果
問題 | No.2343 (l+r)/2 |
ユーザー |
|
提出日時 | 2024-09-08 16:20:28 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 244 bytes |
コンパイル時間 | 262 ms |
コンパイル使用メモリ | 81,968 KB |
実行使用メモリ | 87,524 KB |
最終ジャッジ日時 | 2024-09-08 16:20:31 |
合計ジャッジ時間 | 2,975 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 8 WA * 6 |
ソースコード
for _ in range(int(input())):N = int(input())A = list(map(int, input().split()))if A[0] != A[-1]:print("Yes")else:print("Yes" if any(A[i] == A[i + 1] == 1 - A[0] for i in range(1, N - 2)) else ("Yes" if A.count(1) >= 4 else "No"))