Problem A
Flygildaflug
Languages
en
is
You have decided to participate in the University of
Iceland’s annual drone flying contest. Each contestant in the
contest controls a drone and gets points depending on how they
fly it. The drone starts on the ground (
Output
The first line of the input contains an integer
Input
One line with the sum of all possible flight paths to the
goal
Sample Input 1 | Sample Output 1 |
---|---|
5 1 2 1 1 1 0 2 3 4 5 6 |
2 6 24 120 720 |
Sample Input 2 | Sample Output 2 |
---|---|
5 0 1 1 1 1 0 2 3 4 5 6 |
2 5 15 52 203 |
Sample Input 3 | Sample Output 3 |
---|---|
6 1 3 2 1 1 0 2 3 4 5 6 1000 |
3 13 75 541 4683 581423957 |