版本比较
Myj模拟赛T2 P5967 Korale 题解
正文
增加 2 行删除 2 行
88 行未改动8990919293949596973 行未改动1011021031041051061071081095 行未改动88 行未改动ans=u.first;cnt=1;}else{cnt++;}q.push({u.first+b[u.second+1],u.second+1});if(u.second!=0){q.push({u.first+b[u.second+1]-b[u.second],u.second+1});3 行未改动ans=q.top().first;cnt=1;}else{cnt++;}ans=q.top().first;cout<<ans<<endl;build(1,1,n);5 行未改动88 行未改动8990919293949596973 行未改动1011021031041051061071081095 行未改动88 行未改动ans=u.first;cnt=1;}else{cnt++;}q.push({u.first+b[u.second+1],u.second+1});if(u.second!=0){q.push({u.first+b[u.second+1]-b[u.second],u.second+1});3 行未改动ans=q.top().first;cnt=1;}else{cnt++;}ans=q.top().first;cout<<ans<<endl;build(1,1,n);5 行未改动