#9378. [USACO13MAR] Poker Hands S
[USACO13MAR] Poker Hands S
[USACO13MAR] Poker Hands S
题目描述
Bessie and her friends are playing a unique version of poker involving a deck with N (1 <= NBessie's hand currently holds a_i cards of rank i (0 <= a_i <= 100000). Help her find the minimum number of hands she must play to get rid of all her cards.
输入格式
\* Line 1: The integer N.* Lines 2..1+N: Line i+1 contains the value of a_i.
输出格式
\* Line 1: The minimum number of straights Bessie must play to get rid of all her cards.5
2
4
1
2
3
6