去除奇数
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.
问题陈述
给定序列 ,求从序列中删除元素的最小个数,使得删除后每 个连续元素之和为偶数。
输入格式
第一行都包含一个整数 ( )。 第二行包含 个整数 ( )。( ) 表示序列元素。
输出格式
打印一个整数表示从序列中删除的最小元素数,以使每个 连续元素的和为偶数。
样例1
input
5
2 4 3 6 8
output
1
样例2
input
6
3 5 9 7 1 3
output
0
限制与约定
对于 的数据, 。
对于 的数据,
对于 的数据, 。
- 时间限制:
- 空间限制:
[柳泉中学,龙凤苑中学]拔高班第二次训练
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2025-3-11 19:30
- End at
- 2025-3-11 21:30
- Duration
- 2 hour(s)
- Host
- Partic.
- 63