Help me in solving MAXEQUAL problem

My issue

Not able to understand the question

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here

}

Problem Link: Equal Pairs (Hard) Practice Coding Problem