100 atcoder#ABC103A. [ABC103A] Task Scheduling Problem
[ABC103A] Task Scheduling Problem
Score : points
Problem Statement
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.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the minimum total cost required to complete all the task.
1 6 3
5
When the tasks are completed in the following order, the total cost will be , which is the minimum:
- Complete the first task at cost .
- Complete the third task at cost .
- Complete the second task at cost .
11 5 5
6
100 100 100
0