input:
3 6 2
111111
001100
000000
output:
12 https://www.luogu.com.cn/blog/26512/solution-p4158
https://lzx-ash.blog.luogu.org/si-wei-dp-lai-yi-bo
https://www.luogu.com.cn/blog/sky-stillbeblue/solution-p4158
https://scup.blog.luogu.org/p4158-scoi2009-fen-shua-jiang
https://www.luogu.com.cn/blog/GUO2002/solution-p4158
https://www.luogu.com.cn/blog/datianxia1/p4158-scoi2009-fen-shua-jiang