結果
問題 | No.3070 Collecting Coins Speedrun 2 |
ユーザー |
![]() |
提出日時 | 2025-03-22 00:35:13 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 398 bytes |
コンパイル時間 | 12,522 ms |
コンパイル使用メモリ | 248,792 KB |
実行使用メモリ | 7,968 KB |
最終ジャッジ日時 | 2025-03-22 00:35:37 |
合計ジャッジ時間 | 24,401 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 WA * 1 |
ソースコード
package mainimport . "fmt"func main() {var n intScan(&n)const M=998244353z:=0x,y,c,d:=1,0,1,0for ;n>0;n-- {var a intScan(&a)if a<0 {if y>0 {x=(x*2)%M}y++} else if a>0 {if d> 0 {c=(c*2)%M}d++} else {z=1}}if y>0&&d>0 {if z>0 {x=(x*3)%M}Println(x*c%M*2%M)} else {if z>0 {x=(x*2)%M}Println(x*c%M)}}