版本比较
题解:P14635 [NOIP2025] 糖果店
正文
增加 2 行删除 2 行
66 行未改动6768697071717273747510 行未改动868788899090919293942 行未改动66 行未改动
int main(){ ios::sync_with_stdio(false); cin.tie(0),cout.tie(0);
cin>>n>>m; for(int i=1;i<=n;i++) cin>>a[i].x>>a[i].y;
long long minxy=infll;10 行未改动 if(m-vec[i]<0) break; // 不能少 ans=max(ans,(m-vec[i])/minxy*2+i); } cout<<ans<<"\n";
# ifndef ONLINE_JUDGE cerr<<"\nUsed time: "<<clock()*1.0/CLOCKS_PER_SEC<<"s.\n"; # endif return 0;2 行未改动