結果
問題 |
No.3070 Collecting Coins Speedrun 2
|
ユーザー |
![]() |
提出日時 | 2025-03-22 00:25:14 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 14,311 ms |
コンパイル使用メモリ | 254,396 KB |
実行使用メモリ | 7,968 KB |
最終ジャッジ日時 | 2025-03-22 00:25:41 |
合計ジャッジ時間 | 23,449 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 18 WA * 14 |
ソースコード
package main import . "fmt" func main() { var n int Scan(&n) const M=998244353 x,y,c,d:=1,0,1,0 for ;n>0;n-- { var a int Scan(&a) if a<0 { if y>0 { x=(x*2)%M } y++ } else if a>0 { if d> 0 { c=(c*2)%M } d++ } } if y>0&&d>0 { Println(x*c%M*2%M) } else { Println(x*c%M) } }