#include using namespace std; #define ll long long #define ul unsigned long long #define pb push_back #define ss second #define ff first #define fr(m) for(int i=0; i=0; i--) #define nl '\n' #define yes cout<<"YES"<>n; ll ct1=0, ct0=0; fr(n) { int x; cin>>x; if(x==1) ct1++; else if(x==0) ct0++; } if(ct1!=0) { ll ans; if(ct0==0) ans=ct1; else ans=ct1*pow(2,ct0); cout<> TC; while (TC--) solve(); }