結果

問題 No.2433 Min Increasing Sequence
ユーザー sotanishysotanishy
提出日時 2023-08-18 22:19:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 105,984 KB
最終ジャッジ日時 2024-05-06 04:30:47
合計ジャッジ時間 3,883 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,840 KB
testcase_01 AC 37 ms
51,584 KB
testcase_02 AC 37 ms
52,096 KB
testcase_03 AC 36 ms
51,968 KB
testcase_04 AC 95 ms
100,096 KB
testcase_05 AC 64 ms
82,048 KB
testcase_06 AC 79 ms
96,256 KB
testcase_07 AC 67 ms
84,224 KB
testcase_08 AC 86 ms
101,120 KB
testcase_09 AC 78 ms
92,032 KB
testcase_10 AC 58 ms
74,368 KB
testcase_11 AC 69 ms
84,352 KB
testcase_12 AC 57 ms
72,576 KB
testcase_13 AC 52 ms
69,632 KB
testcase_14 AC 72 ms
88,320 KB
testcase_15 AC 53 ms
70,400 KB
testcase_16 AC 58 ms
74,368 KB
testcase_17 AC 53 ms
69,504 KB
testcase_18 AC 89 ms
104,576 KB
testcase_19 AC 91 ms
105,984 KB
testcase_20 AC 48 ms
60,672 KB
testcase_21 AC 89 ms
99,584 KB
testcase_22 AC 94 ms
104,448 KB
testcase_23 AC 87 ms
96,256 KB
testcase_24 AC 92 ms
105,856 KB
testcase_25 AC 83 ms
100,224 KB
testcase_26 AC 74 ms
91,008 KB
testcase_27 AC 82 ms
98,944 KB
testcase_28 AC 80 ms
94,976 KB
testcase_29 AC 49 ms
65,408 KB
testcase_30 AC 49 ms
65,152 KB
testcase_31 AC 47 ms
63,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

mod = 998244353
N = int(input())
A = list(map(int, input().split()))
x = A[-1]
j = N-1
ans = 1
for i in range(N-1)[::-1]:
    if A[i] <= x:
        ans = ans * (j - i + 1) % mod
        x = A[i]
        j = i
print(ans)
0