auto commit
BIN
docs/notes/pics/3_2001550473624627.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/notes/pics/4_2001550473915641.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 19 KiB |
BIN
docs/notes/pics/5_2001550474110029.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 8.0 KiB |
BIN
docs/notes/pics/6_2001550474388460.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
|
@ -2725,6 +2725,8 @@ public ArrayList<Integer> maxInWindows(int[] num, int size) {
|
|||
|
||||
把 n 个骰子仍在地上,求点数和为 s 的概率。
|
||||
|
||||
<div align="center"> <img src="pics/6_2001550474388460.png"/> </div><br>
|
||||
|
||||
## 解题思路
|
||||
|
||||
### 动态规划解法
|
||||
|
@ -2796,6 +2798,8 @@ public List<Map.Entry<Integer, Double>> dicesSum(int n) {
|
|||
|
||||
五张牌,其中大小鬼为癞子,牌面大小为 0。判断这五张牌是否能组成顺子。
|
||||
|
||||
<div align="center"> <img src="pics/5_2001550474110029.png"/> </div><br>
|
||||
|
||||
## 解题思路
|
||||
|
||||
```java
|
||||
|
@ -2853,6 +2857,8 @@ public int LastRemaining_Solution(int n, int m) {
|
|||
|
||||
可以有一次买入和一次卖出,那么买入必须在前。求最大收益。
|
||||
|
||||
<div align="center"> <img src="pics/3_2001550473624627.png"/> </div><br>
|
||||
|
||||
## 解题思路
|
||||
|
||||
使用贪心策略,假设第 i 轮进行卖出操作,买入操作价格应该在 i 之前并且价格最低。
|
||||
|
@ -2921,7 +2927,7 @@ public int Add(int a, int b) {
|
|||
|
||||
## 题目描述
|
||||
|
||||
给定一个数组 A[0, 1,..., n-1],请构建一个数组 B[0, 1,..., n-1],其中 B 中的元素 B[i]=A[0]\*A[1]\*...\*A[i-1]\*A[i+1]\*...\*A[n-1]。要求不能使用除法。
|
||||
<div align="center"> <img src="pics/4_2001550473915641.png"/> </div><br>
|
||||
|
||||
## 解题思路
|
||||
|
||||
|
|
BIN
docs/pics/3_2001550473624627.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/pics/4_2001550473915641.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 19 KiB |
BIN
docs/pics/5_2001550474110029.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 8.0 KiB |
BIN
docs/pics/6_2001550474388460.png
Normal file
After Width: | Height: | Size: 8.0 KiB |