Main.cpp: In function 'std::pair<int, int> eval(int)':
Main.cpp:15:35: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
15 | #define forto(name, var) for (int (var) = 0; (var) < (name); (var)++)
| ^
Main.cpp:78:5: note: in expansion of macro 'forto'
78 | forto(n, i) {
| ^~~~~
Main.cpp:87:52: error: no matching function for call to 'max(long long int, int)'
87 | events.push_back({max(0ll, middle + 1 - suf), 1, i});
| ^
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 Main.cpp:3:
/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:
Main.cpp:87:52: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
87 | events.push_back({max(0ll, middle + 1 - suf), 1, i});
| ^
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 Main.cpp:3:
/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:
Main.cpp:87:52: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
87 | events.push_back({max(0ll, middle + 1 - suf), 1, i});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from Main.cpp:3:
/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:
Main.cpp:87:52: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
87 | events.push_back({max(0ll, middle + 1 - suf), 1, i});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from Main.cpp:3:
/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:
Main.cpp:87:52: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
87 | events.push_back({max(0ll, middle + 1 - suf), 1, i});
| ^
Main.cpp:87:60: error: no matching function for call to 'std::vector<std::array<int, 3> >::push_back(<brace-enclosed initializer list>)'
87 | events.push_back({max(0ll, middle + 1 - suf), 1, i});
| ^
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from Main.cpp:3:
/usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 3>; _Alloc = std::allocator<std::array<int, 3> >; std::vector<_Tp, _Alloc>::value_type = std::array<int, 3>]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::array<int, 3>&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::array<int, 3>; _Alloc = std::allocator<std::array<int, 3> >; std::vector<_Tp, _Alloc>::value_type = std::array<int, 3>]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
Main.cpp: In function 'int main()':
Main.cpp:10:23: warning: unnecessary parentheses in declaration of 'n' [-Wparentheses]
10 | #define get(name) int (name); cin >> (name)
| ^
Main.cpp:116:5: note: in expansion of macro 'get'
116 | get(n);
| ^~~
Main.cpp:15:35: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
15 | #define forto(name, var) for (int (var) = 0; (var) < (name); (var)++)
| ^
Main.cpp:117:5: note: in expansion of macro 'forto'
117 | forto(n, i) {
| ^~~~~
Main.cpp:10:23: warning: unnecessary parentheses in declaration of 'x' [-Wparentheses]
10 | #define get(name) int (name); cin >> (name)
| ^
Main.cpp:118:9: note: in expansion of macro 'get'
118 | get(x);
| ^~~
Main.cpp:15:35: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
15 | #define forto(name, var) for (int (var) = 0; (var) < (name); (var)++)
| ^
Main.cpp:121:5: note: in expansion of macro 'forto'
121 | forto(n, i) {
| ^~~~~
Main.cpp:10:23: warning: unnecessary parentheses in declaration of 'y' [-Wparentheses]
10 | #define get(name) int (name); cin >> (name)
| ^
Main.cpp:122:9: note: in expansion of macro 'get'
122 | get(y);
| ^~~
Main.cpp:15:35: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
15 | #define forto(name, var) for (int (var) = 0; (var) < (name); (var)++)
| ^
Main.cpp:126:5: note: in expansion of macro 'forto'
126 | forto(n, i) ysum += Y[i];
| ^~~~~
Main.cpp:15:35: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
15 | #define forto(name, var) for (int (var) = 0; (var) < (name); (var)++)
| ^
Main.cpp:132:5: note: in expansion of macro 'forto'
132 | forto(n, i) {
| ^~~~~