func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2005;   int n, m;   int id[N * 2][N * 2];   map<int, int> mp;   vector<int> l[N * 2], e[N * 2];   vector<int> ord;   pair<int, int> a[N];   int dp[N * 2][N * 2];   pair<int, int> DP[N * 2][N * 2];   void type(int i, int j) {     if (DP[i][j].second == 0) {       if (i != 0) printf( %d  , i);       return;     }     if (DP[i][j].first) {       type(i, a[DP[i][j].second].first);       type(DP[i][j].second, a[DP[i][j].second].second);     } else       type(i, DP[i][j].second);   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       int x, y;       scanf( %d%d , &x, &y);       a[i] = make_pair(x - y, x + y);       mp[x - y] = 1;       mp[x + y] = 1;     }     for (map<int, int>::iterator it = mp.begin(); it != mp.end(); it++)       it->second = ++m;     for (int i = 1; i <= n; i++) {       a[i] = make_pair(mp[a[i].first], mp[a[i].second]);       id[a[i].first][a[i].second] = i;       e[a[i].second].push_back(i);       l[a[i].second - a[i].first + 1].push_back(i);     }     a[0] = make_pair(1, m);     l[m].push_back(0);     for (int _ = 1; _ <= m; _++)       for (int __ = 0; __ < l[_].size(); __++) {         int i = l[_][__];         for (int j = a[i].first; j <= a[i].second; j++) {           dp[i][j] = dp[i][j - 1];           DP[i][j] = make_pair(0, j - 1);           for (int k = 0; k < e[j].size(); k++) {             int p = e[j][k];             if (a[p].first >= a[i].first &&                 dp[i][j] < dp[i][a[p].first] + dp[p][a[p].second]) {               dp[i][j] = dp[i][a[p].first] + dp[p][a[p].second];               DP[i][j] = make_pair(1, p);             }           }         }         for (int j = a[i].first; j <= a[i].second; j++) dp[i][j]++;       }     printf( %d n , dp[0][m] - 1);     type(0, m);     puts(  );     return 0;   }   