문제
Problem 1: Poker Hands [Albert Gu, 2011]
Bessie and her friends are playing a unique version of poker involving a deck with N
Bessie's hand currently holds a_i cards of rank i
입력
* Line 1: The integer N.
* Lines
출력
* Line 1: The minimum number of straights Bessie must play to get rid of all her cards.
예제1
5
2
4
1
2
3
6
OUTPUT DETAILS:
Bessie can play a straight from 1 to 5, a straight from 1 to 2, a straight from 4 to 5, two straights from 2 to 2, and a straight from 5 to 5, for a total of 6 rounds necessary to get rid of all her cards.