-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "e200-sms-promotions" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
6 | ||
10 20 30 40 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
15 | ||
10 20 30 40 60 60 70 80 90 150 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
70 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
210 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 云短信平台优惠活动 | ||
|
||
## 题目描述 | ||
|
||
某云短信厂商, 为庆祝国庆, 推出充值优惠活动. | ||
现在给出客户预算, 和优惠售价序列, 求最多可获得的短信总条数. | ||
|
||
### 输入描述 | ||
|
||
- 第一行客户预算M, 其中 0 ≤ M ≤ 10^6 | ||
- 第二行给出售价表, P1, P2, … Pn, 其中 1 ≤ n ≤ 100 | ||
- Pi为充值 i 元获得的短信条数. 1 ≤ Pi ≤ 1000 , 1 ≤ n ≤ 100 | ||
|
||
### 输出描述 | ||
|
||
最多获得的短信条数. | ||
|
||
### 示例1 | ||
|
||
输入: | ||
|
||
```text | ||
{{#include assets/input1.txt}} | ||
``` | ||
|
||
输出: | ||
|
||
```text | ||
{{#include assets/output1.txt}} | ||
``` | ||
|
||
说明: 分两次充值最优, 1元, 5元各充一次, 总条数 10 + 60 = 70. | ||
|
||
### 示例2 | ||
|
||
输入: | ||
|
||
```text | ||
{{#include assets/input2.txt}} | ||
``` | ||
|
||
输出: | ||
|
||
```text | ||
{{#include assets/output2.txt}} | ||
``` | ||
|
||
说明: 分两次充值最优, 10元, 5元各充一次, 总条数 150 + 60 = 210. | ||
|
||
## 题解 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("Hello, world!"); | ||
} |