2170
[골5] 2170 - 선 긋기
#include #include #include #include using namespace std; #define y first #define x second bool cmp(pair& lRef, pair& rRef) { return lRef.y > n; vector v(n); for (int i = 0; i > v[i].y >> v[i].x; sort(v.begin(), v.end(), cmp); int s = INT_MIN, e = INT_MIN, ans = 0; for (int i = 0; ..