#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; struct Line { int start; int end; int price; int state; }; bool cmp(Line*& left, Line*& right) { if (left->state != right->state) { return left...