結果
| 問題 | No.2433 Min Increasing Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-20 16:26:36 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 223 ms / 2,000 ms |
| コード長 | 304 bytes |
| 記録 | |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 85,264 KB |
| 実行使用メモリ | 115,456 KB |
| 最終ジャッジ日時 | 2026-05-20 16:26:50 |
| 合計ジャッジ時間 | 7,166 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 |
ソースコード
import heapq
mod=998244353
n=int(input())
a=list(map(int,input().split()))
hq=[]
for i in range(n):
heapq.heappush(hq,(a[i],i))
b=[]
while hq:
q,w=heapq.heappop(hq)
if b and b[-1]>w:
continue
b.append(w)
ans=1
for i in range(1,len(b)):
ans*=(b[i]-b[i-1]+1);ans%=mod
print(ans)