結果

問題 No.1741 Arrays and XOR Procedure
ユーザー gr1msl3y
提出日時 2021-11-12 21:52:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 249 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 97,792 KB
最終ジャッジ日時 2024-11-25 18:10:34
合計ジャッジ時間 4,250 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
B = list(map(int, input().split()))
MOD = 998244353

ct = 0
for i in range(1, N-1):
    if B[i] == -1:
        ct += 1

a = B[0]
b = B[-1]
if a == b:
    if a >= 0:
        print(0)
        exit()
    ct += 1
print(pow(2, ct, MOD))
0