school.cpp:216:30: error: macro "input" passed 1 arguments, but takes just 0
216 | auto a=ARR(n,2,0ll); input(a);
| ^
school.cpp:151: note: macro "input" defined here
151 | #define input() [](){int x;cin>>x;return x;}()
|
school.cpp:100:6: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
100 | Arr(auto its, auto ite):P(its,ite){}
| ^~~~
school.cpp:100:16: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
100 | Arr(auto its, auto ite):P(its,ite){}
| ^~~~
school.cpp:116:31: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
116 | template<class... A> auto ARR(auto n,A&&... a)
| ^~~~
school.cpp:212:14: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
212 | auto val2cmp(auto val){return [val](auto x, auto y){return mkp(val(x),x)<mkp(val(y),y);};}
| ^~~~
school.cpp: In function 'void solve()':
school.cpp:215:17: error: 'input' was not declared in this scope
215 | auto [n,ca,cb]=input<int,3>();
| ^~~~~
school.cpp:215:26: error: expected primary-expression before ',' token
215 | auto [n,ca,cb]=input<int,3>();
| ^
school.cpp:215:26: error: expected ';' before ',' token
In file included from /usr/include/c++/10/map:60,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from school.cpp:6:
/usr/include/c++/10/bits/stl_tree.h: In instantiation of 'static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<long long int>*]':
/usr/include/c++/10/bits/stl_tree.h:2132:44: required from 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_equal_pos(const key_type&) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = long long int]'
/usr/include/c++/10/bits/stl_tree.h:2181:4: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_equal(_Arg&&) [with _Arg = const long long int&; _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::iterator]'
/usr/include/c++/10/bits/stl_multiset.h:503:36: required from 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = long long int; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::const_iterator; std::multiset<_Key, _Compare, _Alloc>::value_type = long long int]'
school.cpp:170:31: required from 'void Ordering<T, CMP, Rest>::add(const T&) [with T = long long int; CMP = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; Rest = {val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>}]'
school.cpp:239:10: required from here
/usr/include/c++/10/bits/stl_tree.h:772:16: error: static assertion failed: comparison object must be invocable with two arguments of key type
772 | static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_tree.h: In instantiation of 'static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<long long int>*]':
/usr/include/c++/10/bits/stl_tree.h:2132:44: required from 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_equal_pos(const key_type&) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = long long int]'
/usr/include/c++/10/bits/stl_tree.h:2181:4: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_equal(_Arg&&) [with _Arg = const long long int&; _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::iterator]'
/usr/include/c++/10/bits/stl_multiset.h:503:36: required from 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = long long int; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::const_iterator; std::multiset<_Key, _Compare, _Alloc>::value_type = long long int]'
school.cpp:197:31: required from 'void Ordering<T, CMP>::add(const T&) [with T = long long int; CMP = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>]'
school.cpp:251:16: required from here
/usr/include/c++/10/bits/stl_tree.h:772:16: error: static assertion failed: comparison object must be invocable with two arguments of key type
/usr/include/c++/10/bits/stl_tree.h: In instantiation of 'static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<long long int>*]':
/usr/include/c++/10/bits/stl_tree.h:2132:44: required from 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_equal_pos(const key_type&) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = long long int]'
/usr/include/c++/10/bits/stl_tree.h:2181:4: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_equal(_Arg&&) [with _Arg = const long long int&; _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::iterator]'
/usr/include/c++/10/bits/stl_multiset.h:503:36: required from 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = long long int; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::const_iterator; std::multiset<_Key, _Compare, _Alloc>::value_type = long long int]'
school.cpp:197:31: required from 'void Ordering<T, CMP>::add(const T&) [with T = long long int; CMP = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>]'
school.cpp:258:16: required from here
/usr/include/c++/10/bits/stl_tree.h:772:16: error: static assertion failed: comparison object must be invocable with two arguments of key type
/usr/include/c++/10/bits/stl_tree.h: In instantiation of 'static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<long long int>*]':
/usr/include/c++/10/bits/stl_tree.h:2132:44: required from 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_equal_pos(const key_type&) [with _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = long long int]'
/usr/include/c++/10/bits/stl_tree.h:2181:4: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_equal(_Arg&&) [with _Arg = const long long int&; _Key = long long int; _Val = long long int; _KeyOfValue = std::_Identity<long long int>; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::iterator]'
/usr/include/c++/10/bits/stl_multiset.h:503:36: required from 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = long long int; _Compare = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; _Alloc = std::allocator<long long int>; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>, std::allocator<long long int> >::const_iterator; std::multiset<_Key, _Compare, _Alloc>::value_type = long long int]'
school.cpp:197:31: required from 'void Ordering<T, CMP>::add(const T&) [with T = long long int; CMP = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>]'
school.cpp:170:40: required from 'void Ordering<T, CMP, Rest>::add(const T&) [with T = long long int; CMP = val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>; Rest = {val2cmp<solve()::<lambda(i64)> >::<lambda(auto:27, auto:28)>}]'
school.cpp:239:10: required from here
/usr/include/c++/10/bits/stl_tree.h:772:16: error: static assertion failed: comparison object must be invocable with two arguments of key type