Language: C

#include<stdio.h>
#include<stdlib.h>

int ROW_INDEX = 1;
void AllCombs_ints(int min_range, int max_range, int depth, int n_ints, int **comb){
	if(depth > 0){
		for(int x = min_range; x <= max_range; x++){
			comb[0][depth-1] = x;
			if(depth == 1){
				for(int num_i = 1; num_i <= n_ints; num_i++)
					comb[ROW_INDEX][num_i-1] = comb[0][n_ints-num_i];
				ROW_INDEX++;
			}
			AllCombs_ints(x + 1, max_range, depth - 1, n_ints, comb);
		}
	}
	if(depth == n_ints)
		ROW_INDEX = 1;
}

int Find_Rightmost_Col(int threshold, int col_from, int n_rows, int n_slices, int n_cols, 
						int slices[n_slices], int mat[n_rows+1][n_cols+1]){
	int current_col = col_from;
	int value_cell[n_slices+1];
	for(int cell_i = 0; cell_i <= n_slices; cell_i++)
		value_cell[cell_i] = 0;
	while(current_col <= n_cols){
		for(int cell_i = 0; cell_i <= n_slices; cell_i++){
			for(int row_i = (cell_i == 0 ? 1 : slices[cell_i-1] + 1); 
				row_i <= (cell_i == n_slices ? n_rows : slices[cell_i]); row_i++){
				value_cell[cell_i] += mat[row_i][current_col];
			}
			if(value_cell[cell_i] > threshold)
				return current_col - 1;
		}
		current_col++;
	}
	return current_col - 1;
}

int Factorial(int upto){
	if(upto == 0)
		return 1;
	return upto * Factorial(upto-1);
}

int main(){
	int n_rows, n_cols, nmax_white;
	scanf("%d %d %d", &n_rows, &n_cols, &nmax_white);
	int mat_choco[n_rows+1][n_cols+1];
	for(int row_i = 1; row_i <= n_rows; row_i++){
		char str[n_cols];
		scanf("%s", str);
		for(int col_i = 1; col_i <= n_cols; col_i++){
			if(str[col_i-1] == '0')
				mat_choco[row_i][col_i] = 0;
			else
				mat_choco[row_i][col_i] = 1;
		}
	}

	int ans = n_rows * n_cols; //分割の回数の最大値
	for(int n_slices = 0; n_slices < n_rows; n_slices++){
		int n_combs = Factorial(n_rows-1) / Factorial(n_slices) / Factorial(n_rows-1-n_slices);
		int **pt_slice;
		pt_slice = (int **) malloc(sizeof(int *) * (n_combs+1));
		for(int pt_i = 0; pt_i <= n_combs; pt_i++)
			pt_slice[pt_i] = (int *) malloc(sizeof(int) * (n_slices　>　0 ? n_slices : 1));
		AllCombs_ints(1, n_rows-1, n_slices, n_slices, pt_slice);

		for(int comb_i = 1; comb_i <= n_combs; comb_i++){
			int ans_temp = n_slices;
			int current_col = 1;

			while(current_col <= n_cols){
				int col_temp = current_col;
				current_col = Find_Rightmost_Col(nmax_white, current_col, n_rows, n_slices, n_cols, 
													pt_slice[comb_i], mat_choco);
				if(col_temp > current_col){ //分割不可能
					ans_temp = n_rows * n_cols;
					break;
				}
				ans_temp++;
				current_col++;
			}
			if(--ans_temp < ans) //最後の列カウントをans_tempから引く
				ans = ans_temp;
		}
		
		for(int pt_i = 0; pt_i <= n_combs; pt_i++)
			free(pt_slice[pt_i]);
		free(pt_slice);
	}
	printf("%d", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:68:80: error: stray '\343' in program
   68 |                         pt_slice[pt_i] = (int *) malloc(sizeof(int) * (n_slices<U+3000>><U+3000>0 ? n_slices : 1));
      |                                                                                ^~~~~~~~
main.c:68:83: error: stray '\343' in program
   68 |                         pt_slice[pt_i] = (int *) malloc(sizeof(int) * (n_slices<U+3000>><U+3000>0 ? n_slices : 1));
      |                                                                                         ^~~~~~~~