Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a5be53d

Browse files
Merge pull request SharingSource#316 from SharingSource/ac_oier
✨style: Modify 1220
2 parents 9791a2b + c7b3018 commit a5be53d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎LeetCode/1211-1220/1220. 统计元音字母序列的数目(困难).md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Tag : 「线性 DP」、「矩阵快速幂」
4545

4646
---
4747

48-
## 线性 DP
48+
### 线性 DP
4949

5050
**定义 $f[i][j]$ 为考虑长度为 $i + 1$ 的字符串,且结尾元素为 $j$ 的方案数(其中 $j$ 代表数组 `['a', 'e', 'i', 'o', 'u']` 下标)。**
5151

@@ -116,7 +116,8 @@ class Solution {
116116
}
117117
```
118118
-
119-
```Python3
119+
120+
```Python
120121
MOD = int(1e9) + 7
121122
class Solution:
122123
def countVowelPermutation(self, n: int) -> int:
@@ -130,6 +131,7 @@ class Solution:
130131
return (((((f[-1][0] + f[-1][1]) % MOD + f[-1][2]) % MOD + f[-1][3]) % MOD) + f[-1][4]) % MOD
131132
```
132133
-
134+
133135
```Go
134136
const MOD int = 1e9 + 7
135137
func countVowelPermutation(n int) int {
@@ -363,7 +365,7 @@ class Solution {
363365
}
364366
```
365367
-
366-
```Python3
368+
```python
367369
import numpy as np
368370
MOD = 10 ** 9 + 7
369371
dtype = np.dtype('uint64')

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /