请问各位大佬,代码自己测试数据都能过,但只能过25%case
#include<bits/stdc++.h>
using namespace std;
struct st{
int a;
double b;
}s;
int main(){
int T;
int i=1,price[100];
cin>>T;
while(T--){
cin>>s.a>>s.b;
double sum=0;
for(int j=0;j<s.a;j++){
cin>>price[j];
sum+=price[j];
}
for(int j=0;j<s.a;j++){
if(price[j]>s.b||sum*0.7>=s.b){
cout<<"no"<<endl;
break;
}
else if(j==s.a-1)
cout<<"yes"<<endl;
}
}
}
using namespace std;
struct st{
int a;
double b;
}s;
int main(){
int T;
int i=1,price[100];
cin>>T;
while(T--){
cin>>s.a>>s.b;
double sum=0;
for(int j=0;j<s.a;j++){
cin>>price[j];
sum+=price[j];
}
for(int j=0;j<s.a;j++){
if(price[j]>s.b||sum*0.7>=s.b){
cout<<"no"<<endl;
break;
}
else if(j==s.a-1)
cout<<"yes"<<endl;
}
}
}