street_lamps.cpp: In function 'int main()':
street_lamps.cpp:82:17: error: reference to 'ranges' is ambiguous
82 | if (ranges.empty() or ranges.rbegin()->second.first < i - 1) ranges[i] = {i, -1};
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:82:35: error: reference to 'ranges' is ambiguous
82 | if (ranges.empty() or ranges.rbegin()->second.first < i - 1) ranges[i] = {i, -1};
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:82:74: error: reference to 'ranges' is ambiguous
82 | if (ranges.empty() or ranges.rbegin()->second.first < i - 1) ranges[i] = {i, -1};
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:83:18: error: reference to 'ranges' is ambiguous
83 | else ranges.rbegin()->second.first = i;
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp: In lambda function:
street_lamps.cpp:100:27: error: reference to 'ranges' is ambiguous
100 | auto [r, t] = ranges[l];
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:102:13: error: reference to 'ranges' is ambiguous
102 | ranges.erase(l);
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp: In function 'int main()':
street_lamps.cpp:106:23: error: reference to 'ranges' is ambiguous
106 | auto it = ranges.upper_bound(a[i]);
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:107:23: error: reference to 'ranges' is ambiguous
107 | if (it != ranges.begin() and (--it)->second.first >= b[i]) ans += i - it->second.second;
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:111:26: error: reference to 'ranges' is ambiguous
111 | int l = prev(ranges.upper_bound(a[i]))->first;
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:112:21: error: reference to 'ranges' is ambiguous
112 | int r = ranges[l].first;
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:114:27: error: reference to 'ranges' is ambiguous
114 | if (l < a[i]) ranges[l] = {a[i] - 1, i};
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:115:27: error: reference to 'ranges' is ambiguous
115 | if (a[i] < r) ranges[a[i] + 1] = {r, i};
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:119:23: error: reference to 'ranges' is ambiguous
119 | auto it = ranges.upper_bound(r);
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:120:23: error: reference to 'ranges' is ambiguous
120 | if (it != ranges.end() and it->first == r + 1) {
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:124:23: error: reference to 'ranges' is ambiguous
124 | if (it != ranges.begin() and (--it)->second.first == l - 1) rem(l = it->first);
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~
street_lamps.cpp:125:13: error: reference to 'ranges' is ambiguous
125 | ranges[l] = {r, i};
| ^~~~~~
In file included from /usr/include/c++/11/compare:39,
from /usr/include/c++/11/bits/stl_pair.h:65,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from street_lamps.cpp:1:
/usr/include/c++/11/concepts:163:13: note: candidates are: 'namespace std::ranges { }'
163 | namespace ranges
| ^~~~~~
street_lamps.cpp:73:16: note: 'std::map<int, std::pair<int, int> > ranges'
73 | map<int, pint> ranges;
| ^~~~~~