func_code_string: #include <bits/stdc++.h>   using namespace std;   bool compare(const pair<int, int>& i, const pair<int, int>& j) {     return i.first < j.first;   }   int ncr(int n, int k) {     if (n < k) return 0;     int C[n + 1][k + 1];     int i, j;     for (i = 0; i <= n; i++) {       for (j = 0; j <= min(i, k); j++) {         if (j == 0 || j == i)           C[i][j] = 1;         else           C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % 1000000007;       }     }     return C[n][k];   }   long long modpowIter(long long a, long long b, long long c) {     long long ans = 1;     while (b != 0) {       if (b % 2 == 1) ans = (ans * a) % LLONG_MAX;       a = (a * a) % LLONG_MAX;       b /= 2;     }     return ans;   }   string intobin(int n) {     string s =   ;     if (n == 0) s =  0 ;     while (n) {       if (n % 2)         s =  1  + s;       else         s =  0  + s;       n /= 2;     }     return s;   }   int bintoin(string s) {     long long n = 0;     vector<long long> v;     v.push_back(1);     for (int i = 0; i < 400; i++) {       v.push_back((v[v.size() - 1] * 2) % 1000003);     }     for (int i = s.length() - 1; i > -1; i--) {       n = (n + (s[i] -  0 ) * v[s.length() - i - 1]) % 1000003;     }     return n;   }   long long nc2(long long n, long long k) {     if (n < k) return 0;     return (n * (n - 1)) / 2;   }   bool prime[1000001];   void SieveOfEratosthenes(int n) {     memset(prime, true, sizeof(prime));     for (int p = 2; p * p <= n; p++) {       if (prime[p] == true) {         for (int i = p * p; i <= n; i += p) prime[i] = false;       }     }   }   int main() {     int n;     cin >> n;     int m;     cin >> m;     int arr[n];     double b[n];     for (int i = 0; i < n; i++) {       cin >> arr[i] >> b[i];     }     int dp[n];     dp[0] = 1;     for (int i = 1; i <= n - 1; i++) {       dp[i] = 1;       for (int j = 0; j < i; j++) {         if (arr[i] >= arr[j] && dp[i] < dp[j] + 1) dp[i] = dp[j] + 1;       }     }     cout << n - (*max_element(dp, dp + n));     return 0;   }   