Main.cpp:10:21: error: 'maxm' was not declared in this scope
10 | pair <int,int> line[maxm];
| ^~~~
Main.cpp:14:19: error: 'maxn' was not declared in this scope
14 | pair <int,int> st[maxn * 4];
| ^~~~
Main.cpp:18:27: error: 'maxn' was not declared in this scope
18 | pair <int,int> st[maxn * 4];
| ^~~~
Main.cpp: In member function 'void SegmentTree::build(int, int, int, std::pair<int, int>*)':
Main.cpp:22:25: error: 'st' was not declared in this scope; did you mean 'std'?
22 | st[id] = arr[l];
| ^~
| std
Main.cpp:28:17: error: 'st' was not declared in this scope; did you mean 'std'?
28 | st[id] = merge(st[id*2],st[id*2+1]);
| ^~
| std
Main.cpp: In member function 'std::pair<int, int> SegmentTree::get(int, int, int, int, int)':
Main.cpp:31:46: error: 'st' was not declared in this scope; did you mean 'std'?
31 | if (l >= u && r <= v) return st[id];
| ^~
| std
Main.cpp:38:29: error: no matching function for call to 'merge(std::pair<int, int>, std::pair<int, int>)'
38 | return merge(get(id*2,l,mid,u,v),get(id*2+1,mid+1,r,u,v));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
from Main.cpp:1:
/usr/include/c++/13/bits/stl_algo.h:4946:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)'
4946 | merge(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~
/usr/include/c++/13/bits/stl_algo.h:4946:5: note: template argument deduction/substitution failed:
Main.cpp:38:29: note: candidate expects 5 arguments, 2 provided
38 | return merge(get(id*2,l,mid,u,v),get(id*2+1,mid+1,r,u,v));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:4997:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _Compare> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)'
4997 | merge(_InputIterator1 __first1, _InputIterator1 __last1,
| ^~~~~
/usr/include/c++/13/bits/stl_algo.h:4997:5: note: template argument deduction/substitution failed:
Main.cpp:38:29: note: candidate expects 6 arguments, 2 provided
38 | return merge(get(id*2,l,mid,u,v),get(id*2+1,mid+1,r,u,v));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:73:
/usr/include/c++/13/pstl/glue_algorithm_defs.h:412:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::merge(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _ForwardIterator, _Compare)'
412 | merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:412:1: note: template argument deduction/substitution failed:
Main.cpp:38:29: note: candidate expects 7 arguments, 2 provided
38 | return merge(get(id*2,l,mid,u,v),get(id*2+1,mid+1,r,u,v));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:417:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::merge(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _ForwardIterator)'
417 | merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
| ^~~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:417:1: note: template argument deduction/substitution failed:
Main.cpp:38:29: note: candidate expects 6 arguments, 2 provided
38 | return merge(get(id*2,l,mid,u,v),get(id*2+1,mid+1,r,u,v));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp: At global scope:
Main.cpp:43:18: error: 'LOG' was not declared in this scope
43 | SegmentTree jump[LOG + 1];
| ^~~
Main.cpp: In function 'int main()':
Main.cpp:56:36: error: 'st' was not declared in this scope; did you mean 'std'?
56 | for (int i = 1;i <= n;i++) st[i] = {1e9,-1e9};
| ^~
| std
Main.cpp:59:24: error: 'line' was not declared in this scope; did you mean 'link'?
59 | cin >> line[i].first >> line[i].second;
| ^~~~
| link
Main.cpp:62:25: error: 'addmax' was not declared in this scope
62 | addmax(line[i].first,min(line[i].first + k - 1,line[i].second - 1),line[i].second);
| ^~~~~~
Main.cpp:64:25: error: 'addmin' was not declared in this scope
64 | addmin(max(line[i].first - k + 1,line[i].second + 1),line[i].first,line[i].second);
| ^~~~~~
Main.cpp:69:25: error: expected ';' before ')' token
69 | for (int i = 1;i)
| ^
| ;
Main.cpp:71:1: error: expected primary-expression before '}' token
71 | }
| ^
Main.cpp:50:19: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
50 | freopen(thuhien".inp","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:51:19: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
51 | freopen(thuhien".out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~