werewolf.cpp:32:45: error: expression list treated as compound expression in functional cast [-fpermissive]
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^
werewolf.cpp:32:46: error: template argument 1 is invalid
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^
werewolf.cpp:32:45: error: expression list treated as compound expression in functional cast [-fpermissive]
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^
werewolf.cpp:32:46: error: template argument 1 is invalid
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^
werewolf.cpp:32:45: error: expression list treated as compound expression in functional cast [-fpermissive]
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^
werewolf.cpp:32:46: error: template argument 1 is invalid
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^
werewolf.cpp:32:24: error: 'function' is not a type
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^~~~~~~~
werewolf.cpp:32:32: error: expected ',' or '...' before '<' token
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^
werewolf.cpp: In constructor 'Segtree::Segtree(int, int, int)':
werewolf.cpp:30:6: warning: 'Segtree::ini' will be initialized after [-Wreorder]
30 | int ini;
| ^~~
werewolf.cpp:29:24: warning: 'std::function<int(int, int)> Segtree::f' [-Wreorder]
29 | function<int(int,int)>f;
| ^
werewolf.cpp:32:2: warning: when initialized here [-Wreorder]
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^~~~~~~
werewolf.cpp:32:2: warning: 'Segtree::f' is initialized with itself [-Winit-self]
werewolf.cpp: In function 'std::vector<int> check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
werewolf.cpp:61:14: error: 'M' was not declared in this scope
61 | if(N<=3000&&M<=6000&&Q<=3000){
| ^
werewolf.cpp:61:23: error: 'Q' was not declared in this scope
61 | if(N<=3000&&M<=6000&&Q<=3000){
| ^
werewolf.cpp:62:7: error: redeclaration of 'int M'
62 | int M=X.size();
| ^
werewolf.cpp:61:14: note: '<typeprefixerror>M' previously declared here
61 | if(N<=3000&&M<=6000&&Q<=3000){
| ^
werewolf.cpp:63:7: error: redeclaration of 'int Q'
63 | int Q=S.size();
| ^
werewolf.cpp:61:23: note: '<typeprefixerror>Q' previously declared here
61 | if(N<=3000&&M<=6000&&Q<=3000){
| ^
werewolf.cpp:81:8: error: 'M' was not declared in this scope
81 | rep(i,M){
| ^
werewolf.cpp:3:32: note: in definition of macro 'rep'
3 | #define rep(i,n)for(int i=0;i<(n);i++)
| ^
werewolf.cpp:82:11: error: request for member 'push_back' in 'E.std::vector<int>::operator[](((std::vector<int>::size_type)X.std::vector<int>::operator[](((std::vector<int>::size_type)i))))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
82 | E[X[i]].push_back(Y[i]);
| ^~~~~~~~~
werewolf.cpp:83:11: error: request for member 'push_back' in 'E.std::vector<int>::operator[](((std::vector<int>::size_type)Y.std::vector<int>::operator[](((std::vector<int>::size_type)i))))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
83 | E[Y[i]].push_back(X[i]);
| ^~~~~~~~~
werewolf.cpp:87:11: error: request for member 'size' in 'E.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
87 | if(E[i].size()==1){
| ^~~~
werewolf.cpp:96:16: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
96 | for(int u:E[s]){
| ^
| std::begin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from werewolf.cpp:2:
/usr/include/c++/9/valarray:1224:5: note: 'std::begin' declared here
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
werewolf.cpp:96:16: error: 'end' was not declared in this scope; did you mean 'std::end'?
96 | for(int u:E[s]){
| ^
| std::end
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from werewolf.cpp:2:
/usr/include/c++/9/valarray:1244:5: note: 'std::end' declared here
1244 | end(const valarray<_Tp>& __va)
| ^~~
werewolf.cpp:102:54: error: invalid user-defined conversion from 'check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(int, int)>' to 'int' [-fpermissive]
102 | Segtree seg1(N,INF,[](int a,int b){return min(a,b);});
| ^
werewolf.cpp:102:21: note: candidate is: 'check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(int, int)>::operator int (*)(int, int)() const' <near match>
102 | Segtree seg1(N,INF,[](int a,int b){return min(a,b);});
| ^
werewolf.cpp:102:21: note: no known conversion from 'int (*)(int, int)' to 'int'
werewolf.cpp:32:24: note: initializing argument 3 of 'Segtree::Segtree(int, int, int)'
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^~~~~~~~
werewolf.cpp:103:52: error: invalid user-defined conversion from 'check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(int, int)>' to 'int' [-fpermissive]
103 | Segtree seg2(N,0,[](int a,int b){return max(a,b);});
| ^
werewolf.cpp:103:19: note: candidate is: 'check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)::<lambda(int, int)>::operator int (*)(int, int)() const' <near match>
103 | Segtree seg2(N,0,[](int a,int b){return max(a,b);});
| ^
werewolf.cpp:103:19: note: no known conversion from 'int (*)(int, int)' to 'int'
werewolf.cpp:32:24: note: initializing argument 3 of 'Segtree::Segtree(int, int, int)'
32 | Segtree(int n,int ini,function<int(int,int>)f):ini(ini),f(f){
| ^~~~~~~~
werewolf.cpp:109:8: error: 'Q' was not declared in this scope
109 | rep(i,Q){
| ^
werewolf.cpp:3:32: note: in definition of macro 'rep'
3 | #define rep(i,n)for(int i=0;i<(n);i++)
| ^