正文
增加 6 行删除 6 行
9 行未改动10111213141516171862 行未改动81828384858687888990919293943 行未改动98991001011021031041051061071081091101111122 行未改动11511611711811912012112212310 行未改动9 行未改动参考代码:```cppsort(a + 1, a + 1 + n);lst.push_back({0, V});for(int i = 1; i <= n; i++){while(a[i].y >= lst.back().y) lst.pop_back();lst.push_back(a[i]);62 行未改动int n; ll f[N];struct pii{ll x, y;bool operator < (const pii & o) const{return x < o.x;}} a[N]; vector<pii> lst;deque<pii> q;ld get_k(ll ax, ll ay, ll bx, ll by){return (ld)(ay - by) / (ax - bx);}3 行未改动for(int i = 1; i <= n; i++){cin >> a[i].x >> a[i].y;}sort(a + 1, a + 1 + n);lst.push_back({0, V});for(int i = 1; i <= n; i++){while(a[i].y >= lst.back().y) lst.pop_back();lst.push_back(a[i]);}for(int i = 1; i < lst.size(); i++){while(q.size() >= 2){pii tp = q.back();q.pop_back();2 行未改动break;}}q.push_back((pii){lst[i].y, f[i-1]});while(q.size() >= 2){pii tp = q.front();q.pop_front();if(get_k(q.front().x, q.front().y, tp.x, tp.y) <= -lst[i].x){10 行未改动9 行未改动10111213141516171862 行未改动81828384858687888990919293943 行未改动98991001011021031041051061071081091101111122 行未改动11511611711811912012112212310 行未改动9 行未改动参考代码:```cppsort(a + 1, a + 1 + n);lst.push_back({0, V});for(int i = 1; i <= n; i++){while(a[i].y >= lst.back().y) lst.pop_back();lst.push_back(a[i]);62 行未改动int n; ll f[N];struct pii{ll x, y;bool operator < (const pii & o) const{return x < o.x;}} a[N]; vector<pii> lst;deque<pii> q;ld get_k(ll ax, ll ay, ll bx, ll by){return (ld)(ay - by) / (ax - bx);}3 行未改动for(int i = 1; i <= n; i++){cin >> a[i].x >> a[i].y;}sort(a + 1, a + 1 + n);lst.push_back({0, V});for(int i = 1; i <= n; i++){while(a[i].y >= lst.back().y) lst.pop_back();lst.push_back(a[i]);}for(int i = 1; i < lst.size(); i++){while(q.size() >= 2){pii tp = q.back();q.pop_back();2 行未改动break;}}q.push_back((pii){lst[i].y, f[i-1]});while(q.size() >= 2){pii tp = q.front();q.pop_front();if(get_k(q.front().x, q.front().y, tp.x, tp.y) <= -lst[i].x){10 行未改动