My issue
this is my approach and its showing time limit exceed;
//code//
include <bits/stdc++.h>
using namespace std;
int main() {
int t;
int count;
int n,m;
cin>>t;
while(t–){
count=0;
cin>>n>>m;
int a[n];
int b[n];
for(int i=0 ; i<n;i++){
cin>>a[i];
}
for(int i=0 ; i<n;i++){
cin>>b[i];
}
for(int i=0; i<n;i++){
for(int j=0;j<n;j++){
if((a[i]+b[j])%m==0){
count++;
}
}
}
cout<<count<<endl;
}
}
Problem Link: https://www.codechef.com/problems/TREATS