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

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

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

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

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