-
Notifications
You must be signed in to change notification settings - Fork 0
/
A.cpp
42 lines (40 loc) · 738 Bytes
/
A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include<bits/stdc++.h>
using namespace std;
#define fastio ios::sync_with_stdio(0);cin.tie(0)
int main()
{
fastio;
long long t,n,i,ara[105],pos,neg,z;
cin>>t;
while(t--)
{
pos=0; neg=0; z=0;
cin>>n;
for(i=0;i<n;i++)
{
cin>>ara[i];
if(ara[i]>0)
pos++;
else if(ara[i]<0)
neg++;
else
z++;
}
if(z>0)
{
cout<<0<<"\n";
continue;
}
if(neg%2==1)
{
cout<<0<<"\n";
continue;
}
else
{
cout<<1<<"\n";
cout<<1<<" "<<0<<"\n";
}
}
return 0;
}