https://www.codechef.com/problems/SMPAIR

why my code is showing wrong answer on cc ide while its showing perfect on dev c++?

#include<bits/stdc++.h>
using namespace std;
int main()
{
int T;
cin>>T;
while(T–)
{
int *arr;
int N;
cin>>N;
arr=new int[N];
for(int i=0;i<N;i++)
cin>>arr[i];
sort(arr,arr+N);
cout<<arr[0]+arr[1]<<endl;
}
return 0;

}

I’m not seeing any Submissions from you on that problem - are you just clicking “Run” without providing any Custom Input?

yes… although i never gave any custom input earlier too