結果
| 問題 | No.2343 (l+r)/2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-08 16:18:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 212 bytes |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 82,256 KB |
| 実行使用メモリ | 88,004 KB |
| 最終ジャッジ日時 | 2024-09-08 16:18:56 |
| 合計ジャッジ時間 | 3,279 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 WA * 7 |
ソースコード
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 "No")