版本比较
9.14总结
正文
增加 2 行删除 2 行
193 行未改动全部展开19419519619719819920020120211 行未改动21421521621721821922022122210 行未改动193 行未改动全部展开取最大值```cpp#include<bits/stdc++.h>#define int long longusing namespace std;int n, t, a, b, maxn = 0;const int N = 2e5 + 10;int k[N], cnt[N]; // k存储吸引力,cnt是前缀和数组11 行未改动int bore = b * (i - 1);// 如果快速阅读前i-1本书已经超时,退出循环if(bore >= t) {break;}// 计算剩余时间int news = t - bore;// 计算剩余时间可以完整阅读多少本书int ans = news / a;10 行未改动193 行未改动全部展开19419519619719819920020120211 行未改动21421521621721821922022122210 行未改动193 行未改动全部展开取最大值```cpp#include<bits/stdc++.h>#define int long longusing namespace std;int n, t, a, b, maxn = 0;const int N = 2e5 + 10;int k[N], cnt[N]; // k存储吸引力,cnt是前缀和数组11 行未改动int bore = b * (i - 1);// 如果快速阅读前i-1本书已经超时,退出循环if(bore >= t) {break;}// 计算剩余时间int news = t - bore;// 计算剩余时间可以完整阅读多少本书int ans = news / a;10 行未改动