提交时间:2024-05-07 14:00:48

运行 ID: 146044

#include<bits/stdc++.h> using namespace std; int a,b,c,d,e[114],f[24]; int dengjia() { int u,v[114]={0},w=0,x,y,z; v[1]=e[1]; for(u=2;u<=c;u++) { x=0; for() { } if(x==1) { w++; v[w]=e[u]; } } return w; } int main() { cin>>a; for(b=1;b<=a;b++) { memset(e,0,sizeof(e)); cin>>c; for(d=1;d<=c;d++) cin>>e[d]; sort(e,e+c+1,greater<int>()); f[b]=dengjia(); } for(b=1;b<=a;b++) cout<<f[b]<<endl; return 0; }