划分奇数段
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.
Problem Description
给定一个长度为 的整数数组 和一个整数 。
你需要判断能否将这个数组划分成恰好 个连续子段,使得每个子段的元素和都是奇数。
Input Format
第一行包含两个整数 (),分别表示数组长度和需要划分的段数。
第二行包含 个整数 ()。
Output Format
如果存在满足条件的划分方式,输出 Yes;否则输出 No。
Sample
输入 #1
5 2
-7 -10 13 17 19
输出 #1
Yes
输入 #2
5 2
1 -2 -1 2 1
输出 #2
No
重庆邮电大学第二十届ACM程序设计大赛(现场赛)
- Status
- Done
- Rule
- XCPC
- Problem
- 11
- Start at
- 2025-12-28 13:00
- End at
- 2025-12-28 18:00
- Duration
- 5 hour(s)
- Host
- Partic.
- 4