求助```c
#include<bits/stdc++.h>
using namespace std;
const int N=1e4+4;
int t,n,q;
int gender[N];
double height[N];
int main(){
cin>>t;
while(t--){
cin>>n;
for(int i=1;i<=n;i++)
cin>>gender[i];
for(int i=1;i<=n;i++)
cin>>height[i];
for(int i=1;i<n;i++){
for(int j=1;j<n;j++){
if(gender[j]>gender[j+1]){
swap(gender[j],gender[j+1]);
swap(height[j],height[j+1]);
}
}
}
for(int i=1;i<=n;i++){
if(gender[i+1]){
q=i;
break;
}
}
sort(height+1,height+1+q);
sort(height+q+1,height+1+n);
for(int i=1;i<=q;i++)
cout<<height[i]<<" ";
cout<<endl;
for(int i=q+1;i<=n;i++)
cout<<height[i]<<" ";
}
return 0;
}
求求了大佬