Untitled
unknown
c_cpp
a year ago
431 B
1
Indexable
Never
void solve() { ll n, x1, x2; cin >> n >> x1 >> x2; pair<ll, ll> v[n]; for (int i = 0; i < n; ++i) { ll k, b; cin >> k >> b; v[i] = {k * x1 + b, k * x2 + b}; } sort(v, v + n); for (int i = 1; i < n; ++i) { if(v[i].first > v[i - 1].first && v[i].second < v[i - 1].second) { cout << "YES"; return; } } cout << "NO"; }