on which test case should i check my code at
here’s my code
#include
using namespace std;
int main(){
int a[1000];
unsigned int n,ans =0;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
ans ^= a[i];
}
cout<<ans;
return 0;
}
on which test case should i check my code at
here’s my code
#include
using namespace std;
int main(){
int a[1000];
unsigned int n,ans =0;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
ans ^= a[i];
}
cout<<ans;
return 0;
}
i 'm falling in testcase 1 …and compile message is run error
check value of n (from constraints section), and declare ur array size bigger than that