there could be many solutions to the problem, the test case file should deal with any of them but actually it only works for one type of solutions. please fix it.
Poor testcase file
please share ur code which u feel is logically correct and not working for the test cases
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=1;i<=n/2;i++)
{
cout<<i<<" “<<-i<<” ";
}
if(n&1)
cout<<0;
}

for the time being u can get AC if u print the -ve first then +ve
i`ll inform the team to have multiple correct answers
1 Like