結果
| 問題 |
No.3070 Collecting Coins Speedrun 2
|
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2025-03-21 21:52:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 265 bytes |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 82,620 KB |
| 実行使用メモリ | 82,964 KB |
| 最終ジャッジ日時 | 2025-03-21 21:52:39 |
| 合計ジャッジ時間 | 3,047 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 3 |
ソースコード
N = int(input())
C = list(map(int, input().split()))
MOD = 998244353
if 0 <= C[0] and 0 <= C[-1]:
print(pow(2, N-1, MOD))
elif C[0] < 0 and C[-1] < 0:
print(pow(2, N-1, MOD))
elif 0 in C:
print(pow(2, N-2, MOD)*3%MOD)
else:
print(pow(2, N-1, MOD))
detteiuu