結果

問題 No.1586 Equal Array
コンテスト
ユーザー 👑 ArcAki
提出日時 2025-11-14 16:31:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 175 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 21,648 KB
最終ジャッジ日時 2025-11-14 16:31:12
合計ジャッジ時間 2,661 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
f = 1
ok = True
pre = -1
for c in list(map(int, input().split())):
	f ^= c&1
	ok &= pre < 0 or pre==c
	if pre < 0:
		pre = c
print("Yes" if f or ok else "No")
0