A. [R1A]最大奇数

    Type: Default 1000ms 512MiB

[R1A]最大奇数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

时空限制

1S/512M

题目描述

给定 nn 个正整数 A1,A2,...,AnA_1,A_2,...,A_n,求其中最大的奇数。

输入格式

第一行包含一个整数 nn

第二行包含 nn 个整数 A1,A2,...,AnA_1,A_2,...,A_n

输出格式

输出一个整数,表示最大的奇数。如果 A1,A2,...,AnA_1,A_2,...,A_n 中不含奇数,输出 -1\text{-1}

样例

样例输入 #1

4
4 7 3 16

样例输出 #1

7

样例输入 #2

5 
2 4 6 8 10

样例输出 #2

-1

数据规模

对于 20%20\% 的数据,A1,A2,...,AnA_1,A_2,...,A_n 中不含奇数。

对于 100%100\% 的数据,1n2×1051\leq n\leq 2\times 10^51Ai1091\leq A_i \leq 10^9

代码源挑战赛 Round 1

Not Attended
Status
Done
Rule
DMY
Problem
6
Start at
2025-2-28 20:00
End at
2025-2-28 21:30
Duration
1.5 hour(s)
Host
Partic.
524