I am getting correct in my codeblocks ide but wrong answer in codechef ide

#include
#include
using namespace std;
int main()
{
setit;
set::iterator itr;
int testcase;
cin>>testcase;
while(testcase>0)
{
int length;
cin>>length;
int arr[length];
for (int i=0 ; i<length ; i++)
{
cin>>arr[i];
it.insert(arr[i]);
}
itr = it.find(0);
if (itr==it.end())
{
cout<<it.size();
}
else cout<<it.size()-1;

  testcase-+1;

}

return 0;
}

Please Format your code and also provide a link to the question in the description. :slightly_smiling_face:

1 Like