题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5804
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t,n,m;
cin.sync_with_stdio(false);
cin>>t;
while(t--){
cin>>n>>m;
string ans="";
long long sum=0;
int a;
for(int i=0;i<n;i++){
cin>>a;
sum+=a;
}
long long b;
for(int i=0;i<m;i++){
cin>>b;
if(b>sum) ans+='1';
else ans+='0';
}
cout<<ans<<endl;
}
return 0;
}