Problem link :
My solution using bitmasking:
So, i have used bitmasking to generate all possible array values where if ith bit is set then it means that ith element is set to positive else negative.
now as per the constraints my logic should atleast work for N<=15 or First Subtask. but it gives WA . can anyone give a case where my code fails under the contraints of first subtask?