BensonQAQ @ 2020-11-28 18:11:28
#include<iostream>
#include<algorithm>
using namespace std;
int n,s,a,b,x[5001],y[5001],i,ans;
bool z=false;
int main()
{
cin>>n>>s>>a>>b;
a+=b;
for(i=1;i<=n;i++)
cin>>x[i]>>y[i];
sort(y+1,y+n+1);
for(i=1;i<=n;i++)
cout<<endl<<y[i];
for(i=1;i<=n;i++)
{
if(a>=x[i])
z=true;
if(z==true)
{
if(s>=0)
{
s-=y[i];
if(s>=0)
ans++;
}
}
z=false;
}
cout<<ans;
return 0;
}```
by mot1ve @ 2020-11-28 18:14:34
??
by endorphin250 @ 2020-11-28 18:29:43
???
by 阿祖卡布珈德 @ 2020-11-28 18:31:04
?
by cxqghzj @ 2020-11-28 18:39:23
???
发这个干吗???