code runs absolutely fine in my ide.perfect output …codechef says its wrong …maybe constraints help…

#include

using namespace std;

int main ()

{

int t,N;

cin>>t;

for(int i=0;i<t;i++)

{

```
int p=0; int n=0;
cin>>N;
int arr[N];
cin>>arr[0];
if(arr[0]<0)
n=arr[0];
else
{
p=arr[0];
}
for (int j=1;j<N;j++)
{
cin>>arr[j];
int k=0;
for(int m=0;m<j;m++)
{
if(arr[j]==arr[m])
{k++;}
}
if(k==0)
{
if(arr[j]<0)
n=n+arr[j];
else p=p+arr[j];
}
}
cout<<p<<n;
```

}

return 0;

}