#P6332. [COCI 2007/2008 #1] PRINOVA
[COCI 2007/2008 #1] PRINOVA
Problem Description
Given an even sequence of length and two integers , find an odd number such that is maximized.
Input Format
The first line contains an integer , indicating the length of the sequence.
The second line contains numbers , describing this even sequence.
The third line contains two integers , with the meaning as described in the problem statement.
Output Format
Output one integer in one line, representing your answer.
If there are multiple answers, you may print any one of them. This problem uses SPJ.
3
2 6 16
20 50
49
3
2 6 16
3 15
11
3
2 6 16
1 7
5
Hint
Constraints
For of the testdata, it is guaranteed that , , and .
Notes
Translated from COCI2007-2008 CONTEST #1 T3 PRINOVA.
Translated by ChatGPT 5