一只书虫仔 @ 2019-02-20 20:55:10
#include<bits/stdc++.h>
using namespace std;
const int NR = 5500;
int main () {
int n;//how many apple
int s;//tao's power
int a;//how long is chair
int b;//how long is arm
int x[NR];//how long is each apple
int y[NR];//each apple's power
int ans = 0;//how many apple in standard
scanf("%d%d%d%d", &n, &s, &a, &b);
for (int i = 1; i <= n; i++)
scanf("%d%d", &x[i], &y[i]);
for (int i = 1; i <= n; i++)
if (s >= y[i] && x[i] <= a + b) {
ans++;
s -= y[i];
}
printf("%d", ans);
return 0;
}
dalao!秋祝!QAQ!
by NaCly_Fish @ 2019-02-20 21:24:27
@Irressey 但是您实际吊打窝QAQ
by 花里心爱 @ 2019-02-20 21:25:00
@NaCly_Fish 但是您实际吊打窝qwq
by CYJian @ 2019-02-20 21:36:26
how many apple 可还行。。连复数都没有的么。。一堆语法错误的说(逃
by CYJian @ 2019-02-20 21:37:28
@Irressey @NaCly_Fish orz高排名巨佬
by 花里心爱 @ 2019-02-20 21:42:48
@暮雪﹃紛紛 您强啊qwqwq
by NaCly_Fish @ 2019-02-20 21:56:29
@暮雪﹃紛紛 您强啊QAQ
by CYJian @ 2019-02-20 21:57:25
@NaCly_Fish @Irressey 大佬开始嘲讽咸鱼了Q_Q
by NaCly_Fish @ 2019-02-20 22:10:04
@暮雪﹃紛紛 您不仅强还fAKe啊QAQ
by 花里心爱 @ 2019-02-20 22:40:39
@暮雪﹃紛紛 您不仅强还fAKe啊qwq
by 应吟吟 @ 2019-02-21 07:58:37
@ NaCly_Fish @ Irressey @ 暮雪﹃紛紛
都别争了,我最蒻了qwq