func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2000 + 1, inf = 2e8 + 1;   int a, m, n;   bool d[N];   int p[N];   int dp[N];   int main() {     ios_base::sync_with_stdio(false);     cout.tie(0);     cin.tie(0);     cin >> a >> n >> m;     for (int i = 0; i < n; ++i) {       int l, r;       cin >> l >> r;       for (int i = l; i < r; ++i) d[i] = true;     }     for (int i = 0; i <= a; ++i) p[i] = inf;     for (int i = 0; i < m; ++i) {       int x, px;       cin >> x >> px;       p[x] = min(p[x], px);     }     for (int i = a - 1; i >= 0; --i) {       dp[i] = inf;       if (!d[i]) dp[i] = dp[i + 1];       if (p[i] != inf)         for (int j = i + 1; j <= a; ++j)           if (dp[j] != inf) dp[i] = min(dp[i], p[i] * (j - i) + dp[j]);     }     cout << (dp[0] == inf ? -1 : dp[0]) <<   n ;   }   