Đề thi chọn ĐT - Hà Nội 24 - Ngày 1
Time limit: 1.0 /
Memory limit: 256M
Point: 5

Ví dụ:
Input
7 3
2 1 2 0 0 2 1
Output
6
Ví dụ 2:
Input
4 2
1 1 0 0
Output
4
Nguồn
Time limit: 1.0 /
Memory limit: 256M
Point: 5

Ví dụ:
Input
abba
Output
5
5
Nguồn
Time limit: 1.0 /
Memory limit: 256M
Point: 5

Ví dụ:
Input
4
3 2 2 2
Output
2
Nguồn
Time limit: 1.0 /
Memory limit: 256M
Point: 5

Ví dụ:
Input
3
1 1 2
2 1 2
1 2
1 3
Output
21
Nguồn