結果
| 問題 |
No.3070 Collecting Coins Speedrun 2
|
| コンテスト | |
| ユーザー |
ID 21712
|
| 提出日時 | 2025-03-22 00:23:02 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 319 bytes |
| コンパイル時間 | 11,642 ms |
| コンパイル使用メモリ | 236,820 KB |
| 実行使用メモリ | 7,968 KB |
| 最終ジャッジ日時 | 2025-03-22 00:23:25 |
| 合計ジャッジ時間 | 22,246 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 4 WA * 28 |
ソースコード
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*y)%M
}
y++
} else if a>0 {
if d> 0 {
c=(c*d)%M
}
d++
}
}
if y>0&&d>0 {
Println(x*c%M*2%M)
} else {
Println(x*c%M)
}
}
ID 21712