結果

問題 No.2055 12x34...
ユーザー 👑 rin204rin204
提出日時 2022-08-23 14:58:27
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 185 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 524,460 KB
最終ジャッジ日時 2024-04-19 06:08:00
合計ジャッジ時間 8,458 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,584 KB
testcase_01 AC 36 ms
51,712 KB
testcase_02 AC 70 ms
78,848 KB
testcase_03 AC 86 ms
90,496 KB
testcase_04 AC 98 ms
97,408 KB
testcase_05 AC 102 ms
100,340 KB
testcase_06 AC 95 ms
97,344 KB
testcase_07 AC 88 ms
92,544 KB
testcase_08 AC 83 ms
86,528 KB
testcase_09 AC 104 ms
100,480 KB
testcase_10 AC 108 ms
103,936 KB
testcase_11 AC 76 ms
84,992 KB
testcase_12 AC 93 ms
105,344 KB
testcase_13 AC 121 ms
103,680 KB
testcase_14 AC 75 ms
89,088 KB
testcase_15 AC 71 ms
88,960 KB
testcase_16 AC 123 ms
105,816 KB
testcase_17 AC 294 ms
155,776 KB
testcase_18 AC 830 ms
341,692 KB
testcase_19 AC 94 ms
90,044 KB
testcase_20 AC 58 ms
77,424 KB
testcase_21 AC 94 ms
90,012 KB
testcase_22 MLE -
testcase_23 AC 108 ms
109,460 KB
testcase_24 AC 115 ms
120,064 KB
testcase_25 AC 109 ms
112,236 KB
testcase_26 AC 123 ms
118,400 KB
testcase_27 AC 119 ms
120,200 KB
testcase_28 AC 121 ms
121,976 KB
testcase_29 AC 115 ms
114,832 KB
testcase_30 AC 112 ms
118,684 KB
testcase_31 AC 110 ms
121,800 KB
testcase_32 AC 113 ms
122,272 KB
testcase_33 AC 126 ms
105,224 KB
testcase_34 AC 127 ms
105,028 KB
testcase_35 AC 124 ms
105,032 KB
testcase_36 AC 121 ms
105,008 KB
testcase_37 AC 125 ms
105,016 KB
testcase_38 AC 123 ms
105,088 KB
testcase_39 AC 128 ms
105,056 KB
testcase_40 AC 125 ms
104,960 KB
testcase_41 AC 122 ms
105,088 KB
testcase_42 AC 122 ms
104,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

n = int(input())
A = list(map(int, input().split()))
dp = {}
ans = 0
for a in A:
    x = dp.get(a - 1, 0)
    ans += x
    dp[a] = dp.get(a, 0) + x + 1
print(ans % MOD)
0