Orz!而师份时身妈请框?

P1478 陶陶摘苹果(升级版)

一只书虫仔 @ 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 Fatalis_Lights @ 2020-05-07 17:22:22

@ NaCly_Fish @ Irressey @ CYJian

都别争了,我最煞笔了。


by btng_smith666 @ 2020-05-07 18:04:40

烤谷


by btng_smith666 @ 2020-05-07 18:04:57

吃我一记洛阳铲!


by btng_smith666 @ 2020-05-07 18:05:44

这里是三个dalao一起fAke的地方(


by My_Faith @ 2020-05-10 22:23:34

@一只书虫仔 谔谔考古qwq


by Clintikas97 @ 2020-05-15 20:21:23

每日考古心情好,https://www.luogu.com.cn/blog/Shuchong/shui-shui-shui


by Yusani_huh @ 2020-08-07 15:09:50

考古,学长被鱼鱼 at 祭


上一页 |