#ABC103A. Task Scheduling Problem
Task Scheduling Problem
题目描述
You have three tasks, all of which need to be completed.
First, you can complete any one task at cost .
Then, just after completing the -th task, you can complete the -th task at cost .
Here, denotes the absolute value of .
Find the minimum total cost required to complete all the task.
您有三项任务,都需要完成。
首先,您可以花费 完成任何一项任务。
然后,在完成 /-三项任务后,你可以完成 /三项任务,费用为 。
这里, 表示 的绝对值。
求完成所有任务所需的最小总成本。
输入格式
$A_1$ $A_2$ $A_3$
输出格式
打印完成所有任务所需的最低总成本。
样例 #1
样例输入 #1
1 6 3
样例输出 #1
5
样例 #2
样例输入 #2
11 5 5
样例输出 #2
6
样例 #3
样例输入 #3
100 100 100
样例输出 #3
0
说明
数据规模与约定
- 所有输入值均为整数。
样例 解释
当任务按以下顺序完成时,总成本将为 ,即最低成本:
- 完成第一项任务的成本为 。
- 完成第三项任务,成本为 。
- 完成第二项任务,费用为 。