結果
| 問題 |
No.2343 (l+r)/2
|
| コンテスト | |
| ユーザー |
sepa38
|
| 提出日時 | 2023-06-09 21:16:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 293 bytes |
| コンパイル時間 | 428 ms |
| コンパイル使用メモリ | 82,396 KB |
| 実行使用メモリ | 85,964 KB |
| 最終ジャッジ日時 | 2025-01-02 02:01:51 |
| 合計ジャッジ時間 | 2,446 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 WA * 7 |
ソースコード
for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
o = sum(a)
k = o - (n - o)
for i in range(n-1):
if a[i] != a[i+1]:
continue
if a[i]:
if k > 0:
k -= 1
else:
if k < 0:
k += 1
print("No" if k else "Yes")
sepa38