Help me in solving AIRM problem

My issue

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	int min;
	
	while(t--){
	    int n;
	    cin>>n;
	    int A[n];
	    int D[n];
	}
	return 0;
}

Problem Link: AIRM Problem - CodeChef

@shailesh7773
the logic is count the frequency of each element in both A[n] and D[n] and then print the maximum frequency