#include #include #include #include #include #include using namespace std; #define N 10000 #define LL __int64 #define rep(i,a,n) for(int i=a;i=a;--i) #define pb push_back #define mp make_pair #define all(v) v.begin(),v.end() #define N 100005 char ans[N]; int main() { int i,n,m,T,t; LL q,sum; scanf("%d",&T); while(T--){ scanf("%d%d",&n,&m); sum=0; rep(i,0,n) { scanf("%d",&t); sum+=t; } rep(i,0,m){ scanf("%I64d",&q); if(q>sum){ ans[i]='1'; } else ans[i]='0'; } cout<