golf.cpp:68:25: error: 'int y1 [100005]' redeclared as different kind of entity
68 | int x1[100005],y1[100005],x2[100005],y2[100005];
| ^
In file included from /usr/include/features.h:424,
from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:524,
from /usr/include/c++/9/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:33,
from golf.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:221:1: note: previous declaration 'double y1(double)'
221 | __MATHCALL (y1,, (_Mdouble_));
| ^~~~~~~~~~
golf.cpp: In function 'void build(int)':
golf.cpp:76:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
76 | add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
| ^
golf.cpp:76:39: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
76 | add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from golf.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1184 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
1184 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1200 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
1200 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
golf.cpp:76:67: warning: pointer to a function used in arithmetic [-Wpointer-arith]
76 | add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
| ^
golf.cpp:76:75: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
76 | add[x1[i]].push_back({y1[i],y2[i]}),del[x2[i]].push_back({y1[i],y2[i]});
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from golf.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1184 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
1184 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1200 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
1200 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
golf.cpp:111:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
golf.cpp:111:25: error: no matching function for call to 'swap(int&, double (&)(double) throw ())'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/sstream:849:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&)'
849 | swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/9/sstream:849:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/sstream:856:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>&)'
856 | swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/9/sstream:856:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/sstream:863:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>&)'
863 | swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/9/sstream:863:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/sstream:870:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>&)'
870 | swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
| ^~~~
/usr/include/c++/9/sstream:870:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from golf.cpp:1:
/usr/include/c++/9/bits/regex.h:844:5: note: candidate: 'template<class _Ch_type, class _Rx_traits> void std::__cxx11::swap(std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&)'
844 | swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
| ^~~~
/usr/include/c++/9/bits/regex.h:844:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::__cxx11::basic_regex<_Ch_type, _Rx_traits>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from golf.cpp:1:
/usr/include/c++/9/bits/regex.h:2029:5: note: candidate: 'template<class _Bi_iter, class _Alloc> void std::__cxx11::swap(std::__cxx11::match_results<_BiIter, _Alloc>&, std::__cxx11::match_results<_BiIter, _Alloc>&)'
2029 | swap(match_results<_Bi_iter, _Alloc>& __lhs,
| ^~~~
/usr/include/c++/9/bits/regex.h:2029:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::__cxx11::match_results<_BiIter, _Alloc>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
from /usr/include/c++/9/exception:144,
from /usr/include/c++/9/ios:39,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/bits/move.h:182:5: note: candidate: 'template<class _Tp> typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&)'
182 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/9/bits/move.h:182:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: deduced conflicting types for parameter '_Tp' ('int' and 'double(double) throw ()' {aka 'double(double)'})
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
from /usr/include/c++/9/exception:144,
from /usr/include/c++/9/ios:39,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/bits/move.h:205:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> typename std::enable_if<std::__is_swappable<_Tp>::value>::type std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])'
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~~
/usr/include/c++/9/bits/move.h:205:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types '_Tp [_Nm]' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:495:5: note: candidate: 'template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)'
495 | swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
| ^~~~
/usr/include/c++/9/bits/stl_pair.h:495:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from golf.cpp:1:
/usr/include/c++/9/bits/basic_string.h:6378:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> void std::swap(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6378 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~
/usr/include/c++/9/bits/basic_string.h:6378:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/deque:67,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
from golf.cpp:1:
/usr/include/c++/9/bits/stl_deque.h:2366:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(std::deque<_Tp, _Alloc>&, std::deque<_Tp, _Alloc>&)'
2366 | swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
| ^~~~
/usr/include/c++/9/bits/stl_deque.h:2366:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::deque<_Tp, _Alloc>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
from golf.cpp:1:
/usr/include/c++/9/fstream:1264:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_filebuf<_CharT, _Traits>&, std::basic_filebuf<_CharT, _Traits>&)'
1264 | swap(basic_filebuf<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/9/fstream:1264:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::basic_filebuf<_CharT, _Traits>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
from golf.cpp:1:
/usr/include/c++/9/fstream:1271:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_ifstream<_CharT, _Traits>&, std::basic_ifstream<_CharT, _Traits>&)'
1271 | swap(basic_ifstream<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/9/fstream:1271:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::basic_ifstream<_CharT, _Traits>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
from golf.cpp:1:
/usr/include/c++/9/fstream:1278:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_ofstream<_CharT, _Traits>&, std::basic_ofstream<_CharT, _Traits>&)'
1278 | swap(basic_ofstream<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/9/fstream:1278:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::basic_ofstream<_CharT, _Traits>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:70,
from golf.cpp:1:
/usr/include/c++/9/fstream:1285:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_fstream<_CharT, _Traits>&, std::basic_fstream<_CharT, _Traits>&)'
1285 | swap(basic_fstream<_CharT, _Traits>& __x,
| ^~~~
/usr/include/c++/9/fstream:1285:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::basic_fstream<_CharT, _Traits>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/functional:54,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:71,
from golf.cpp:1:
/usr/include/c++/9/array:294:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> void std::swap(std::array<_Tp, _Nm>&, std::array<_Tp, _Nm>&)'
294 | swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
| ^~~~
/usr/include/c++/9/array:294:5: note: template argument deduction/substitution failed:
golf.cpp:111:25: note: mismatched types 'std::array<_Tp, _Nm>' and 'int'
111 | swap(x1[i],y1[i]),swap(x2[i],y2[i]);
| ^
In file included from /usr/include/c++/9/functional:54,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:71,
from golf.cpp:1:
/usr/include/c++/9/tuple:1624:5: note: candidate: 'template<class ... _Elements> void std::swap(std::tuple<_Tps ...>&, std::tuple<_Tps ...>&)'
1624 | swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
| ^~