cf/mirror

Odd-Even Subsequence

CF
1370D2000· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
4 2
1 2 3 4
Output
1
Sample 2of 4
Input
4 3
1 2 3 4
Output
2
Sample 3of 4
Input
5 3
5 3 4 2 6
Output
2
Sample 4of 4
Input
6 4
5 3 50 2 4 5
Output
3
1370D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…