248
提交数: 22, 通过率: 31.82%, 平均分: 51.41
题目描述:
给定一个
输入格式:
The first line of input contains N, and the next N lines give the sequence of N numbers at the start of the game.
输出格式:
Please output the largest integer Bessie can generate.
样例输入:
4 1 1 1 2
样例输出:
3
提示:
In this example shown here, Bessie first merges the second and third 1s to obtain the sequence 1 2 2 , and then she merges the 2s into a 3. Note that it is not optimal to join the first two 1s.
时间限制: 1000ms空间限制: 128MB
来源: Usaco2016 Open Gold