typedef long long ll; typedef long double ld; #include using namespace std; signed main() { ll n,k; std::cin >> n>>k; vector h(n); for (int i = 0; i < n; i++) { std::cin >> h[i]; } vector x(n),y(n); for (int i = 0; i < n; i++) { std::cin >> x[i]>>y[i]; } vector> hxy(n); for (int i = 0; i < n; i++) { hxy[i] = {h[i], x[i], y[i]}; } sort(hxy.begin(),hxy.end()); ll ans = n; for (int i = 0; i < n; i++) { auto [hi,xi,yi] = hxy[i]; for (int j = i+1; j < n; j++) { auto [hj,xj,yj] = hxy[j]; if(hi