Олимпиадный тренинг

Задача 39071. Pairs of numbers - 04


Задача

Темы: ЕГЭ
The file contains a sequence of integers. Sequence elements can take integer values ​​from -10 000 to 10 000 inclusive. Determine the number of pairs of the sequence in which both numbers are even, and the sum of the elements of the pair is not more than the minimum odd element of the sequence. In your answer, write down the  number of found pairs, then the maximum of the sums of the elements of such pairs (two numbers separated by a space in one line). In this problem, a pair means two successive elements of a sequence.

Assignment file