Help me in solving BLDST problem

My issue

please explain the problem in a better way

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int n,m;
	cin>>n>>m;
	int f;
	cin>>f;
	int arr[f];
	for(int i=0;i<f;i++){
	    cin>>arr[i];
	}
	
	
	return 0;
}

Problem Link: BLDST Problem - CodeChef

@jatin1159
The problem states that u have N boxes and M kind of balls
u have to put each ball in a box such that no two balls of same color is in the same box .
The task is to minimize the count of box that have M balls inside.