public static int MaxSolidTeam(int [] q)
if(q[next] <= q[first] + q[first+1])
if(next - first > countMax)
public static void Test(int [] q)
Console.WriteLine("Max solid headcount of {{{0}}} is {1}",
string.Join(" ", q), MaxSolidTeam(q));
public static void Main()
Test(new[]{ 1, 1, 1, 1});
Test(new[]{ 1, 1, 1, 10});
Test(new[]{ 1, 1, 1, 5, 5, 5, 5});
Test(new[]{ 11, 12, 13, 101, 102, 103, 104, 105});