| 1 | const ll is_query = -(1LL<<62); |
| 2 | struct Line { |
| 3 | ll m, b; |
| 4 | mutable function<const Line*()> succ; |
| 5 | bool operator<(const Line& rhs) const { |
| 6 | if (rhs.b != is_query) return m < rhs.m; |
| 7 | const Line* s = succ(); |
| 8 | if (!s) return 0; |
| 9 | ll x = rhs.m; |
| 10 | return b - s->b < (s->m - m) * x; } }; |
| 11 | // will maintain upper hull for maximum |
| 12 | struct HullDynamic : public multiset<Line> { |
| 13 | bool bad(iterator y) { |
nothing calls this directly
no outgoing calls
no test coverage detected