func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 100;   struct Node {     int a, b, id;     Node() {}     Node(int a, int b, int id) : a(a), b(b), id(id) {}     bool operator<(const Node& th) const { return a < th.a; }   } node[N];   int vis[N];   int main() {     int n, m;     while (scanf( %d%d , &n, &m) != EOF) {       for (int i = 0; i < m; i++) {         int a, b;         scanf( %d%d , &a, &b);         b += a - 1;         node[i] = Node(a, b, i);       }       sort(node, node + m);       int l = 0;       int i = 0;       memset(vis, 0, sizeof(vis));       int cnt = 0;       while (i < m) {         l = max(l, node[i].a - 1);         int r = node[i].b;         int id = i;         while (i < m && node[i].a <= l + 1) {           if (node[i].b > r) {             id = i;             r = node[i].b;           }           i++;         }         if (r > l) {           cnt++;           vis[node[id].id] = 1;         }         l = max(l, r);       }       cnt = m - cnt;       printf( %d n , cnt);       for (int i = 0; i < m; i++)         if (!vis[i]) {           cnt--;           printf( %d%c , i + 1, cnt == 0 ?   n  :    );         }     }     return 0;   }   