segments.cpp:3:28: warning: bad option '-favx2' to pragma 'optimize' [-Wpragmas]
3 | #pragma GCC optimize("avx2")
| ^
segments.cpp:12:30: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
12 | bool fff(segment p, segment q){
| ^
segments.cpp:30:21: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
30 | void buildStructure(){
| ^
segments.cpp:66:21: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
66 | void handleQt1(int k){
| ^
segments.cpp:77:21: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
77 | void handleQt2(int k){
| ^
segments.cpp:83:22: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
83 | void handleQt3(int ti){
| ^
segments.cpp:130:10: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
130 | int main()
| ^
segments.cpp: In function 'int main()':
segments.cpp:138:21: error: no matching function for call to 'max(__gnu_cxx::__enable_if<true, double>::__type, int)'
138 | qbsz=max(sqrt(n)-1,1);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from segments.cpp:5:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
segments.cpp:138:21: note: deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
138 | qbsz=max(sqrt(n)-1,1);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from segments.cpp:5:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
segments.cpp:138:21: note: deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
138 | qbsz=max(sqrt(n)-1,1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from segments.cpp:5:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
segments.cpp:138:21: note: mismatched types 'std::initializer_list<_Tp>' and 'double'
138 | qbsz=max(sqrt(n)-1,1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from segments.cpp:5:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
segments.cpp:138:21: note: mismatched types 'std::initializer_list<_Tp>' and 'double'
138 | qbsz=max(sqrt(n)-1,1);
| ^
segments.cpp:136:10: warning: unused variable 'l' [-Wunused-variable]
136 | int i,qt,l,r,id,k,f=0,qbsz;
| ^
segments.cpp:136:12: warning: unused variable 'r' [-Wunused-variable]
136 | int i,qt,l,r,id,k,f=0,qbsz;
| ^
segments.cpp:136:14: warning: unused variable 'id' [-Wunused-variable]
136 | int i,qt,l,r,id,k,f=0,qbsz;
| ^~
segments.cpp:136:17: warning: unused variable 'k' [-Wunused-variable]
136 | int i,qt,l,r,id,k,f=0,qbsz;
| ^
segments.cpp:136:19: warning: unused variable 'f' [-Wunused-variable]
136 | int i,qt,l,r,id,k,f=0,qbsz;
| ^