请问为什么下载的测试点自己测试是对的,洛谷测试wa?

P1478 陶陶摘苹果(升级版)

请不要用一级标题来体现头文件的重要性。
by t162 @ 2019-02-12 15:07:21


火钳留名
by SPARTAN_117 @ 2019-02-12 15:10:24


@[Bambusoideae](/space/show?uid=106140) 人家大佬没打 这个=>```
by PrincessQi @ 2019-02-12 15:11:07


@[Dr冯](/space/show?uid=104662) 别人开玩笑的23333,认真你就输了
by superMB @ 2019-02-12 15:12:35


@[superMB](/space/show?uid=118265) 233
by PrincessQi @ 2019-02-12 15:22:26


@[Bambusoideae](/space/show?uid=106140) 新手不太会用……
by Polaris_blig @ 2019-02-12 15:56:35


请各位dalao帮忙看一下 ```cpp include<iostream> include<iomanip> include<math.h> include<cstring> include<string> include<fstream> include<sstream> include<algorithm> include<vector> using namespace std; bool compare( vector<int> x,vector<int> y) { return x[1] < y[1]; } int main() { int n, s, a, b; int count = 0; vector<vector<int> > xy ; cin >> n >> s >> a >> b; for (int i = 0;i < n;i++) { int xi, yi; cin >> xi >> yi; xy.push_back({ xi,yi }); } sort(xy.begin(), xy.end(), compare); for (int j = 0;j < n;j++) { if (s > 0) { if ((a + b) >= xy[j][0] && (s - xy[j][1] >= 0)) { count++; s -= xy[j][1]; } else if (s - xy[j][1] < 0) break; } } cout << count; return 0; } ```
by Polaris_blig @ 2019-02-12 16:12:37


测试点是什么啊
by wangqz @ 2021-06-28 15:19:35


你的#呢
by huangxingzhi02 @ 2021-08-17 10:28:52


|