Help me in solving MAXHAMDIST problem

My issue

i am able to solve the initial 3 problems of div 4 and i want to accomplish 4th too if anyone can help

My code

#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--){
	    
	}
	return 0;
}

Problem Link: Maximize Hamming Distance Practice Coding Problem