foo.cc: In function 'int main()':
foo.cc:20:6: error: expected ')' before 'vector'
   20 |     }
      |      ^
      |      )
   21 |     vector<p>v2;
      |     ~~~~~~
foo.cc:17:9: note: to match this '('
   17 |     sort(v.begin(),v.end(),[](p&i,p&j)
      |         ^
foo.cc:25:9: error: 'v2' was not declared in this scope; did you mean 'v'?
   25 |         v2.push_back(p{l,r});
      |         ^~
      |         v
foo.cc:27:17: error: 'v2' was not declared in this scope; did you mean 'v'?
   27 |     for(auto it=v2.begin();it<v2.end();it++)
      |                 ^~
      |                 v
foo.cc:32:23: error: 'l1' was not declared in this scope; did you mean 'l'?
   32 |             for(int i=l1;i<=r1;i++)
      |                       ^~
      |                       l
foo.cc:32:29: error: 'r1' was not declared in this scope; did you mean 'r'?
   32 |             for(int i=l1;i<=r1;i++)
      |                             ^~
      |                             r
   
  
    [Hydro](https://hydro.ac)提供评测服务