This code is running well as expected, but TLE error is coming.pls check

#include
using namespace std;
void winner(int m,int n){
int a_phone,h_phone;
a_phone=h_phone=0;
for(int i=1;i<=m;i=i+2){
a_phone+=i;
}
for(int i=2;i<=n;i=i+2){
h_phone+=i;
}
if(a_phone>h_phone){
cout<<“Aayush”<<endl;
}
else if(a_phone<h_phone){
cout<<“Harshit”<<endl;
}
}
int main() {
int t;
cin>>t;
int a[t],h[t];
for(int i=0;i<t;i++){
cin>>a[i]>>h[i];
}
for(int i=0;i<t;i++){
int m,n;
m=a[i];
n=h[i];
winner(m,n);
}
return 0;
}

why you are storing n and m in array,
no need to store them

Replace this

replace this with

while(t--){
        cin >> m >> n;
        winner(m, n);
    }

Modified Code