結果
問題 | No.2055 12x34... |
ユーザー | SyuKing_Order |
提出日時 | 2022-08-21 13:13:25 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 354 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 262,108 KB |
最終ジャッジ日時 | 2024-04-18 12:50:11 |
合計ジャッジ時間 | 7,233 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 35 ms
57,088 KB |
testcase_01 | AC | 34 ms
51,840 KB |
testcase_02 | AC | 67 ms
76,288 KB |
testcase_03 | AC | 89 ms
93,312 KB |
testcase_04 | AC | 102 ms
100,608 KB |
testcase_05 | AC | 106 ms
103,424 KB |
testcase_06 | AC | 100 ms
100,480 KB |
testcase_07 | AC | 90 ms
95,104 KB |
testcase_08 | AC | 80 ms
89,584 KB |
testcase_09 | AC | 109 ms
103,936 KB |
testcase_10 | AC | 115 ms
107,648 KB |
testcase_11 | AC | 72 ms
84,864 KB |
testcase_12 | AC | 88 ms
106,368 KB |
testcase_13 | AC | 117 ms
105,600 KB |
testcase_14 | AC | 71 ms
89,600 KB |
testcase_15 | AC | 71 ms
89,600 KB |
testcase_16 | AC | 123 ms
107,260 KB |
testcase_17 | AC | 1,364 ms
156,400 KB |
testcase_18 | TLE | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
ソースコード
n = int(input()) a = list(map(int, input().split())) g = {} dist = [0]*n for i in range(n): ai = a[i] if ai in g: dist[i] = g[ai] if ai+1 in g: g[ai+1] += dist[i]+1 else: g[ai+1] = dist[i]+1 dist[i] %= 998244353 print(sum(dist)%998244353)