#include#include #include using namespace std;int main(){ int c; cin>>c; while(c--){ int n,v,w; cin>>n>>v>>w; vector vec; for(int i=0;i >temp; vec.push_back(temp); } sort(vec.begin(),vec.end()); double sum=0; int cut=0; for(auto it=vec.begin();it!=vec.end();++it){ sum+=(*it);cut++; if(sum>w*cut){ sum-=(*it);cut--;break; } } if(cut == 0){ cout<<"0 0.00\n"; }else printf("%d %0.2lf\n",cut*v,sum*0.01/cut);//注意要/100,第一次忘了 } return 0;}