#include #include using namespace std;bool cmp(int a,int b){return a>b;}int main(){int n;cin>>n;for(int i=1;i{int gnum,mnum;cin>>gnum>>mnum;int gun[gnum],monster[mnum];for(int j=0;jcin>>gun[j];for(int k=0;kcin>>monster[k];sort(monster,monster+mnum);//防御力从小到大sort(gun,gun+gnum,cmp);//攻击力从大到小 int j=0;long long award=0;while(gun[j]>monster[j])//当{award+=gun[j]-monster[j];j++;}cout}}