staciakampis.cpp:5:52: error: 'less' was not declared in this scope
5 | template <class T> using Tree = tree<T, null_type, less<T>,
| ^~~~
staciakampis.cpp:5:52: note: suggested alternatives:
In file included from /usr/include/c++/11/string:48,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stl_function.h:354:12: note: 'std::less'
354 | struct less;
| ^~~~
In file included from /usr/include/c++/11/bits/iterator_concepts.h:37,
from /usr/include/c++/11/bits/stl_iterator_base_types.h:71,
from /usr/include/c++/11/iterator:61,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/ranges_cmp.h:112:10: note: 'std::ranges::less'
112 | struct less
| ^~~~
In file included from /usr/include/c++/11/bits/stl_iterator.h:81,
from /usr/include/c++/11/iterator:63,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/compare:53:46: note: 'std::__cmp_cat::_Ord::less'
53 | enum class _Ord : type { equivalent = 0, less = -1, greater = 1 };
| ^~~~
staciakampis.cpp:5:58: error: template argument 3 is invalid
5 | template <class T> using Tree = tree<T, null_type, less<T>,
| ^
staciakampis.cpp: In function 'void treeExample()':
staciakampis.cpp:12:9: error: 'Tree' was not declared in this scope; did you mean 'free'?
12 | Tree<int> t, t2; t.insert(8);
| ^~~~
| free
staciakampis.cpp:12:14: error: expected primary-expression before 'int'
12 | Tree<int> t, t2; t.insert(8);
| ^~~
staciakampis.cpp:12:26: error: 't' was not declared in this scope; did you mean 'tm'?
12 | Tree<int> t, t2; t.insert(8);
| ^
| tm
staciakampis.cpp:16:16: error: 't2' was not declared in this scope; did you mean 'tm'?
16 | t.join(t2); // assuming T < T2 or T > T2, merge t2 into t
| ^~
| tm
staciakampis.cpp: At global scope:
staciakampis.cpp:20:32: error: variable or field 're' declared void
20 | template<class T> void re(complex<T>& x);
| ^~
staciakampis.cpp:20:35: error: 'complex' was not declared in this scope
20 | template<class T> void re(complex<T>& x);
| ^~~~~~~
staciakampis.cpp:20:44: error: expected primary-expression before '>' token
20 | template<class T> void re(complex<T>& x);
| ^
staciakampis.cpp:20:47: error: 'x' was not declared in this scope
20 | template<class T> void re(complex<T>& x);
| ^
staciakampis.cpp:21:43: error: variable or field 're' declared void
21 | template<class T1, class T2> void re(pair<T1,T2>& p);
| ^~
staciakampis.cpp:21:46: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
21 | template<class T1, class T2> void re(pair<T1,T2>& p);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/iterator:63,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:2488:12: note: 'std::pair' declared here
2488 | struct pair;
| ^~~~
staciakampis.cpp:21:53: error: expected primary-expression before ',' token
21 | template<class T1, class T2> void re(pair<T1,T2>& p);
| ^
staciakampis.cpp:21:56: error: expected primary-expression before '>' token
21 | template<class T1, class T2> void re(pair<T1,T2>& p);
| ^
staciakampis.cpp:21:59: error: 'p' was not declared in this scope
21 | template<class T1, class T2> void re(pair<T1,T2>& p);
| ^
staciakampis.cpp:22:32: error: variable or field 're' declared void
22 | template<class T> void re(vector<T>& a);
| ^~
staciakampis.cpp:22:35: error: 'vector' was not declared in this scope
22 | template<class T> void re(vector<T>& a);
| ^~~~~~
staciakampis.cpp:22:35: note: suggested alternatives:
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
staciakampis.cpp:22:43: error: expected primary-expression before '>' token
22 | template<class T> void re(vector<T>& a);
| ^
staciakampis.cpp:22:46: error: 'a' was not declared in this scope
22 | template<class T> void re(vector<T>& a);
| ^
staciakampis.cpp:23:43: error: variable or field 're' declared void
23 | template<class T, size_t SZ> void re(array<T,SZ>& a);
| ^~
staciakampis.cpp:23:46: error: 'array' was not declared in this scope; did you mean 'std::array'?
23 | template<class T, size_t SZ> void re(array<T,SZ>& a);
| ^~~~~
| std::array
In file included from /usr/include/c++/11/tuple:39,
from /usr/include/c++/11/functional:54,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/array:95:12: note: 'std::array' declared here
95 | struct array
| ^~~~~
staciakampis.cpp:23:53: error: expected primary-expression before ',' token
23 | template<class T, size_t SZ> void re(array<T,SZ>& a);
| ^
staciakampis.cpp:23:59: error: 'a' was not declared in this scope
23 | template<class T, size_t SZ> void re(array<T,SZ>& a);
| ^
staciakampis.cpp: In function 'void input::re(T&)':
staciakampis.cpp:25:43: error: 'cin' was not declared in this scope; did you mean 'sin'?
25 | template<class T> void re(T& x) { cin >> x; }
| ^~~
| sin
staciakampis.cpp: In function 'void input::re(double&)':
staciakampis.cpp:26:30: error: 'string' was not declared in this scope
26 | void re(double& x) { string t; re(t); x = stod(t); }
| ^~~~~~
staciakampis.cpp:26:30: note: suggested alternatives:
In file included from /usr/include/c++/11/iosfwd:39,
from /usr/include/c++/11/iterator:64,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stringfwd.h:79:33: note: 'std::string'
79 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/string:67:11: note: 'std::pmr::string'
67 | using string = basic_string<char>;
| ^~~~~~
staciakampis.cpp:26:43: error: 't' was not declared in this scope
26 | void re(double& x) { string t; re(t); x = stod(t); }
| ^
staciakampis.cpp:26:51: error: 'stod' was not declared in this scope; did you mean 'std::__cxx11::stod'?
26 | void re(double& x) { string t; re(t); x = stod(t); }
| ^~~~
| std::__cxx11::stod
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6780:3: note: 'std::__cxx11::stod' declared here
6780 | stod(const wstring& __str, size_t* __idx = 0)
| ^~~~
staciakampis.cpp: At global scope:
staciakampis.cpp:27:14: error: variable or field 're' declared void
27 | void re(ld& x) { string t; re(t); x = stold(t); }
| ^~
staciakampis.cpp:27:17: error: 'ld' was not declared in this scope
27 | void re(ld& x) { string t; re(t); x = stold(t); }
| ^~
staciakampis.cpp:27:21: error: 'x' was not declared in this scope
27 | void re(ld& x) { string t; re(t); x = stold(t); }
| ^
staciakampis.cpp:32:32: error: variable or field 're' declared void
32 | template<class T> void re(complex<T>& x) { T a,b; re(a,b); x = cd(a,b); }
| ^~
staciakampis.cpp:32:35: error: 'complex' was not declared in this scope
32 | template<class T> void re(complex<T>& x) { T a,b; re(a,b); x = cd(a,b); }
| ^~~~~~~
staciakampis.cpp:32:44: error: expected primary-expression before '>' token
32 | template<class T> void re(complex<T>& x) { T a,b; re(a,b); x = cd(a,b); }
| ^
staciakampis.cpp:32:47: error: 'x' was not declared in this scope
32 | template<class T> void re(complex<T>& x) { T a,b; re(a,b); x = cd(a,b); }
| ^
staciakampis.cpp:33:43: error: variable or field 're' declared void
33 | template<class T1, class T2> void re(pair<T1,T2>& p) { re(p.f,p.s); }
| ^~
staciakampis.cpp:33:46: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
33 | template<class T1, class T2> void re(pair<T1,T2>& p) { re(p.f,p.s); }
| ^~~~
| std::pair
In file included from /usr/include/c++/11/iterator:63,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:2488:12: note: 'std::pair' declared here
2488 | struct pair;
| ^~~~
staciakampis.cpp:33:53: error: expected primary-expression before ',' token
33 | template<class T1, class T2> void re(pair<T1,T2>& p) { re(p.f,p.s); }
| ^
staciakampis.cpp:33:56: error: expected primary-expression before '>' token
33 | template<class T1, class T2> void re(pair<T1,T2>& p) { re(p.f,p.s); }
| ^
staciakampis.cpp:33:59: error: 'p' was not declared in this scope
33 | template<class T1, class T2> void re(pair<T1,T2>& p) { re(p.f,p.s); }
| ^
staciakampis.cpp:34:32: error: variable or field 're' declared void
34 | template<class T> void re(vector<T>& a) { F0R(i,sz(a)) re(a[i]); }
| ^~
staciakampis.cpp:34:35: error: 'vector' was not declared in this scope
34 | template<class T> void re(vector<T>& a) { F0R(i,sz(a)) re(a[i]); }
| ^~~~~~
staciakampis.cpp:34:35: note: suggested alternatives:
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
staciakampis.cpp:34:43: error: expected primary-expression before '>' token
34 | template<class T> void re(vector<T>& a) { F0R(i,sz(a)) re(a[i]); }
| ^
staciakampis.cpp:34:46: error: 'a' was not declared in this scope
34 | template<class T> void re(vector<T>& a) { F0R(i,sz(a)) re(a[i]); }
| ^
staciakampis.cpp:35:43: error: variable or field 're' declared void
35 | template<class T, size_t SZ> void re(array<T,SZ>& a) { F0R(i,SZ) re(a[i]); }
| ^~
staciakampis.cpp:35:46: error: 'array' was not declared in this scope; did you mean 'std::array'?
35 | template<class T, size_t SZ> void re(array<T,SZ>& a) { F0R(i,SZ) re(a[i]); }
| ^~~~~
| std::array
In file included from /usr/include/c++/11/tuple:39,
from /usr/include/c++/11/functional:54,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/array:95:12: note: 'std::array' declared here
95 | struct array
| ^~~~~
staciakampis.cpp:35:53: error: expected primary-expression before ',' token
35 | template<class T, size_t SZ> void re(array<T,SZ>& a) { F0R(i,SZ) re(a[i]); }
| ^
staciakampis.cpp:35:59: error: 'a' was not declared in this scope
35 | template<class T, size_t SZ> void re(array<T,SZ>& a) { F0R(i,SZ) re(a[i]); }
| ^
staciakampis.cpp: In function 'void output::pr(int)':
staciakampis.cpp:41:26: error: 'cout' was not declared in this scope
41 | void pr(int x) { cout << x; }
| ^~~~
staciakampis.cpp: In function 'void output::pr(long int)':
staciakampis.cpp:42:27: error: 'cout' was not declared in this scope
42 | void pr(long x) { cout << x; }
| ^~~~
staciakampis.cpp: At global scope:
staciakampis.cpp:43:14: error: variable or field 'pr' declared void
43 | void pr(ll x) { cout << x; }
| ^~
staciakampis.cpp:43:17: error: 'll' was not declared in this scope
43 | void pr(ll x) { cout << x; }
| ^~
staciakampis.cpp: In function 'void output::pr(unsigned int)':
staciakampis.cpp:44:31: error: 'cout' was not declared in this scope
44 | void pr(unsigned x) { cout << x; }
| ^~~~
staciakampis.cpp: In function 'void output::pr(long unsigned int)':
staciakampis.cpp:45:36: error: 'cout' was not declared in this scope
45 | void pr(unsigned long x) { cout << x; }
| ^~~~
staciakampis.cpp: In function 'void output::pr(long long unsigned int)':
staciakampis.cpp:46:41: error: 'cout' was not declared in this scope
46 | void pr(unsigned long long x) { cout << x; }
| ^~~~
staciakampis.cpp: In function 'void output::pr(float)':
staciakampis.cpp:47:28: error: 'cout' was not declared in this scope
47 | void pr(float x) { cout << x; }
| ^~~~
staciakampis.cpp: In function 'void output::pr(double)':
staciakampis.cpp:48:29: error: 'cout' was not declared in this scope
48 | void pr(double x) { cout << x; }
| ^~~~
staciakampis.cpp: At global scope:
staciakampis.cpp:49:14: error: variable or field 'pr' declared void
49 | void pr(ld x) { cout << x; }
| ^~
staciakampis.cpp:49:17: error: 'ld' was not declared in this scope
49 | void pr(ld x) { cout << x; }
| ^~
staciakampis.cpp: In function 'void output::pr(char)':
staciakampis.cpp:50:27: error: 'cout' was not declared in this scope
50 | void pr(char x) { cout << x; }
| ^~~~
staciakampis.cpp: In function 'void output::pr(const char*)':
staciakampis.cpp:51:34: error: 'cout' was not declared in this scope
51 | void pr(const char* x) { cout << x; }
| ^~~~
staciakampis.cpp: At global scope:
staciakampis.cpp:52:23: error: 'string' does not name a type; did you mean 'stdin'?
52 | void pr(const string& x) { cout << x; }
| ^~~~~~
| stdin
staciakampis.cpp: In function 'void output::pr(const int&)':
staciakampis.cpp:52:36: error: 'cout' was not declared in this scope
52 | void pr(const string& x) { cout << x; }
| ^~~~
staciakampis.cpp: At global scope:
staciakampis.cpp:54:41: error: 'complex' does not name a type
54 | template<class T> void pr(const complex<T>& x) { cout << x; }
| ^~~~~~~
staciakampis.cpp:54:48: error: expected ',' or '...' before '<' token
54 | template<class T> void pr(const complex<T>& x) { cout << x; }
| ^
staciakampis.cpp: In function 'void output::pr(int)':
staciakampis.cpp:54:58: error: 'cout' was not declared in this scope
54 | template<class T> void pr(const complex<T>& x) { cout << x; }
| ^~~~
staciakampis.cpp:54:66: error: 'x' was not declared in this scope
54 | template<class T> void pr(const complex<T>& x) { cout << x; }
| ^
staciakampis.cpp: At global scope:
staciakampis.cpp:56:52: error: 'pair' does not name a type
56 | template<class T1, class T2> void pr(const pair<T1,T2>& x);
| ^~~~
staciakampis.cpp:56:56: error: expected ',' or '...' before '<' token
56 | template<class T1, class T2> void pr(const pair<T1,T2>& x);
| ^
staciakampis.cpp:62:52: error: 'pair' does not name a type
62 | template<class T1, class T2> void pr(const pair<T1,T2>& x) {
| ^~~~
staciakampis.cpp:62:56: error: expected ',' or '...' before '<' token
62 | template<class T1, class T2> void pr(const pair<T1,T2>& x) {
| ^
staciakampis.cpp: In function 'void output::pr(int)':
staciakampis.cpp:63:24: error: 'x' was not declared in this scope
63 | pr("{",x.f,", ",x.s,"}");
| ^
staciakampis.cpp: At global scope:
staciakampis.cpp:86:14: error: variable or field 'setIn' declared void
86 | void setIn(string s) { freopen(s.c_str(),"r",stdin); }
| ^~~~~
staciakampis.cpp:86:20: error: 'string' was not declared in this scope
86 | void setIn(string s) { freopen(s.c_str(),"r",stdin); }
| ^~~~~~
staciakampis.cpp:86:20: note: suggested alternatives:
In file included from /usr/include/c++/11/iosfwd:39,
from /usr/include/c++/11/iterator:64,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stringfwd.h:79:33: note: 'std::string'
79 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/string:67:11: note: 'std::pmr::string'
67 | using string = basic_string<char>;
| ^~~~~~
staciakampis.cpp:87:14: error: variable or field 'setOut' declared void
87 | void setOut(string s) { freopen(s.c_str(),"w",stdout); }
| ^~~~~~
staciakampis.cpp:87:21: error: 'string' was not declared in this scope
87 | void setOut(string s) { freopen(s.c_str(),"w",stdout); }
| ^~~~~~
staciakampis.cpp:87:21: note: suggested alternatives:
In file included from /usr/include/c++/11/iosfwd:39,
from /usr/include/c++/11/iterator:64,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stringfwd.h:79:33: note: 'std::string'
79 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/string:67:11: note: 'std::pmr::string'
67 | using string = basic_string<char>;
| ^~~~~~
staciakampis.cpp:88:14: error: variable or field 'setIO' declared void
88 | void setIO(string s = "") {
| ^~~~~
staciakampis.cpp:88:20: error: 'string' was not declared in this scope
88 | void setIO(string s = "") {
| ^~~~~~
staciakampis.cpp:88:20: note: suggested alternatives:
In file included from /usr/include/c++/11/iosfwd:39,
from /usr/include/c++/11/iterator:64,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/stringfwd.h:79:33: note: 'std::string'
79 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/string:67:11: note: 'std::pmr::string'
67 | using string = basic_string<char>;
| ^~~~~~
staciakampis.cpp:98:32: error: 'MOD' was not declared in this scope
98 | typedef decay<decltype(MOD)>::type T;
| ^~~
staciakampis.cpp:98:32: error: 'MOD' was not declared in this scope
staciakampis.cpp:98:17: error: 'decay' does not name a type
98 | typedef decay<decltype(MOD)>::type T;
| ^~~~~
staciakampis.cpp:99:9: error: 'T' does not name a type
99 | T v;
| ^
staciakampis.cpp:100:27: error: expected type-specifier before 'T'
100 | explicit operator T() const { return v; }
| ^
staciakampis.cpp:102:14: error: expected ')' before '_v'
102 | mi(ll _v) {
| ~ ^~~
| )
staciakampis.cpp:114:16: error: 'ostream' does not name a type
114 | friend ostream& operator<<(ostream& os, const mi& a) {
| ^~~~~~~
staciakampis.cpp:134:29: error: 'll' has not been declared
134 | friend mi pow(mi a, ll p) {
| ^~
staciakampis.cpp: In constructor 'mi::mi()':
staciakampis.cpp:101:16: error: 'v' was not declared in this scope
101 | mi() { v = 0; }
| ^
staciakampis.cpp: In function 'bool operator==(const mi&, const mi&)':
staciakampis.cpp:107:26: error: 'const struct mi' has no member named 'v'
107 | return a.v == b.v; }
| ^
staciakampis.cpp:107:33: error: 'const struct mi' has no member named 'v'
107 | return a.v == b.v; }
| ^
staciakampis.cpp: In function 'bool operator<(const mi&, const mi&)':
staciakampis.cpp:111:26: error: 'const struct mi' has no member named 'v'
111 | return a.v < b.v; }
| ^
staciakampis.cpp:111:32: error: 'const struct mi' has no member named 'v'
111 | return a.v < b.v; }
| ^
staciakampis.cpp: In function 'void re(mi&)':
staciakampis.cpp:112:33: error: 'll' was not declared in this scope
112 | friend void re(mi& a) { ll x; re(x); a = mi(x); }
| ^~
staciakampis.cpp:112:42: error: 'x' was not declared in this scope
112 | friend void re(mi& a) { ll x; re(x); a = mi(x); }
| ^
staciakampis.cpp: In function 'void pr(const mi&)':
staciakampis.cpp:113:44: error: 'const struct mi' has no member named 'v'
113 | friend void pr(const mi& a) { pr(a.v); }
| ^
staciakampis.cpp: In member function 'mi mi::operator-() const':
staciakampis.cpp:117:43: error: 'v' was not declared in this scope
117 | mi operator-() const { return mi(-v); }
| ^
staciakampis.cpp: In member function 'mi& mi::operator+=(const mi&)':
staciakampis.cpp:119:22: error: 'v' was not declared in this scope
119 | if ((v += m.v) >= MOD) v -= MOD;
| ^
staciakampis.cpp:119:29: error: 'const struct mi' has no member named 'v'
119 | if ((v += m.v) >= MOD) v -= MOD;
| ^
staciakampis.cpp:119:35: error: 'MOD' was not declared in this scope
119 | if ((v += m.v) >= MOD) v -= MOD;
| ^~~
staciakampis.cpp: In member function 'mi& mi::operator-=(const mi&)':
staciakampis.cpp:122:22: error: 'v' was not declared in this scope
122 | if ((v -= m.v) < 0) v += MOD;
| ^
staciakampis.cpp:122:29: error: 'const struct mi' has no member named 'v'
122 | if ((v -= m.v) < 0) v += MOD;
| ^
staciakampis.cpp:122:42: error: 'MOD' was not declared in this scope
122 | if ((v -= m.v) < 0) v += MOD;
| ^~~
staciakampis.cpp: In member function 'mi& mi::operator++()':
staciakampis.cpp:124:41: error: no match for 'operator+=' (operand types are 'mi' and 'int')
124 | mi& operator++() { return *this += 1; }
| ~~~~~~^~~~
staciakampis.cpp:118:13: note: candidate: 'mi& mi::operator+=(const mi&)'
118 | mi& operator+=(const mi& m) {
| ^~~~~~~~
staciakampis.cpp:118:34: note: no known conversion for argument 1 from 'int' to 'const mi&'
118 | mi& operator+=(const mi& m) {
| ~~~~~~~~~~^
staciakampis.cpp: In member function 'mi& mi::operator--()':
staciakampis.cpp:125:41: error: no match for 'operator-=' (operand types are 'mi' and 'int')
125 | mi& operator--() { return *this -= 1; }
| ~~~~~~^~~~
staciakampis.cpp:121:13: note: candidate: 'mi& mi::operator-=(const mi&)'
121 | mi& operator-=(const mi& m) {
| ^~~~~~~~
staciakampis.cpp:121:34: note: no known conversion for argument 1 from 'int' to 'const mi&'
121 | mi& operator-=(const mi& m) {
| ~~~~~~~~~~^
staciakampis.cpp: In member function 'mi& mi::operator*=(const mi&)':
staciakampis.cpp:130:17: error: 'v' was not declared in this scope
130 | v = (ll)v*m.v%MOD; return *this; }
| ^
staciakampis.cpp:130:22: error: 'll' was not declared in this scope
130 | v = (ll)v*m.v%MOD; return *this; }
| ^~
staciakampis.cpp: In function 'mi pow(mi, int)':
staciakampis.cpp:135:26: error: conversion from 'int' to non-scalar type 'mi' requested
135 | mi ans = 1; assert(p >= 0);
| ^
In file included from /usr/include/c++/11/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:45,
from /usr/include/c++/11/ext/pb_ds/detail/container_base_dispatch.hpp:90,
from /usr/include/c++/11/ext/pb_ds/assoc_container.hpp:48,
from staciakampis.cpp:2:
staciakampis.cpp: In function 'mi inv(const mi&)':
staciakampis.cpp:140:26: error: 'const struct mi' has no member named 'v'
140 | assert(a.v != 0); return pow(a,MOD-2); }
| ^
staciakampis.cpp:140:48: error: 'MOD' was not declared in this scope
140 | assert(a.v != 0); return pow(a,MOD-2); }
| ^~~
staciakampis.cpp: At global scope:
staciakampis.cpp:142:9: error: 'vector' does not name a type
142 | typedef vector<mi> vmi;
| ^~~~~~
staciakampis.cpp:143:9: error: 'pair' does not name a type
143 | typedef pair<mi,mi> pmi;
| ^~~~
staciakampis.cpp:144:16: error: 'pmi' was not declared in this scope; did you mean 'mi'?
144 | typedef vector<pmi> vpmi;
| ^~~
| mi
staciakampis.cpp:144:16: error: 'pmi' was not declared in this scope; did you mean 'mi'?
144 | typedef vector<pmi> vpmi;
| ^~~
| mi
staciakampis.cpp:144:16: error: 'pmi' was not declared in this scope; did you mean 'mi'?
144 | typedef vector<pmi> vpmi;
| ^~~
| mi
staciakampis.cpp:144:16: error: 'pmi' was not declared in this scope; did you mean 'mi'?
144 | typedef vector<pmi> vpmi;
| ^~~
| mi
staciakampis.cpp:144:16: error: 'pmi' was not declared in this scope; did you mean 'mi'?
144 | typedef vector<pmi> vpmi;
| ^~~
| mi
staciakampis.cpp:144:16: error: 'pmi' was not declared in this scope; did you mean 'mi'?
144 | typedef vector<pmi> vpmi;
| ^~~
| mi
staciakampis.cpp:144:9: error: 'vector' does not name a type
144 | typedef vector<pmi> vpmi;
| ^~~~~~
staciakampis.cpp:146:10: error: 'MX' was not declared in this scope
146 | int K, a[MX], b[MX];
| ^~
staciakampis.cpp:146:17: error: 'MX' was not declared in this scope
146 | int K, a[MX], b[MX];
| ^~
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:9: error: 'vi' was not declared in this scope; did you mean 'mi'?
147 | map<int,vi> x;
| ^~
| mi
staciakampis.cpp:147:1: error: 'map' does not name a type
147 | map<int,vi> x;
| ^~~
staciakampis.cpp:148:1: error: 'vl' does not name a type
148 | vl res;
| ^~
staciakampis.cpp:150:6: error: variable or field 'tri' declared void
150 | void tri(ll w, ll h) {
| ^~~
staciakampis.cpp:150:10: error: 'll' was not declared in this scope
150 | void tri(ll w, ll h) {
| ^~
staciakampis.cpp:150:16: error: 'll' was not declared in this scope
150 | void tri(ll w, ll h) {
| ^~
staciakampis.cpp: In function 'int main()':
staciakampis.cpp:180:9: error: 'ios_base' has not been declared
180 | ios_base::sync_with_stdio(0); cin.tie(0);
| ^~~~~~~~
staciakampis.cpp:180:39: error: 'cin' was not declared in this scope; did you mean 'sin'?
180 | ios_base::sync_with_stdio(0); cin.tie(0);
| ^~~
| sin
staciakampis.cpp:181:20: error: 'i' was not declared in this scope; did you mean 'mi'?
181 | re(K); F0R(i,K) re(a[i],b[i]);
| ^
| mi
staciakampis.cpp:181:16: error: 'F0R' was not declared in this scope
181 | re(K); F0R(i,K) re(a[i],b[i]);
| ^~~
staciakampis.cpp:182:9: error: 'll' was not declared in this scope
182 | ll sum = 0;
| ^~
staciakampis.cpp:187:14: error: 't' was not declared in this scope; did you mean 'tm'?
187 | trav(t,x) if (sum%t.f == 0)
| ^
| tm
staciakampis.cpp:187:16: error: 'x' was not declared in this scope
187 | trav(t,x) if (sum%t.f == 0)
| ^
staciakampis.cpp:187:9: error: 'trav' was not declared in this scope
187 | trav(t,x) if (sum%t.f == 0)
| ^~~~
staciakampis.cpp:189:18: error: 'res' was not declared in this scope
189 | sort(all(res)); res.erase(unique(all(res)),end(res));
| ^~~
staciakampis.cpp:189:14: error: 'all' was not declared in this scope
189 | sort(all(res)); res.erase(unique(all(res)),end(res));
| ^~~
staciakampis.cpp:189:9: error: 'sort' was not declared in this scope
189 | sort(all(res)); res.erase(unique(all(res)),end(res));
| ^~~~
staciakampis.cpp:189:9: note: suggested alternatives:
In file included from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort'
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
In file included from /usr/include/c++/11/algorithm:64,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/ranges_algo.h:1834:30: note: 'std::ranges::sort'
1834 | inline constexpr __sort_fn sort{};
| ^~~~
staciakampis.cpp:189:35: error: 'unique' was not declared in this scope
189 | sort(all(res)); res.erase(unique(all(res)),end(res));
| ^~~~~~
staciakampis.cpp:189:35: note: suggested alternatives:
In file included from /usr/include/c++/11/algorithm:74,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/pstl/glue_algorithm_defs.h:234:1: note: 'std::unique'
234 | unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
| ^~~~~~
In file included from /usr/include/c++/11/algorithm:64,
from /usr/include/c++/11/ext/pb_ds/detail/types_traits.hpp:44,
from /usr/include/c++/11/ext/pb_ds/detail/branch_policy/branch_policy.hpp:45,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:47,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/ranges_algo.h:1186:32: note: 'std::ranges::unique'
1186 | inline constexpr __unique_fn unique{};
| ^~~~~~
staciakampis.cpp:189:52: error: 'end' was not declared in this scope
189 | sort(all(res)); res.erase(unique(all(res)),end(res));
| ^~~
staciakampis.cpp:189:52: note: suggested alternatives:
In file included from /usr/include/c++/11/string:54,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/range_access.h:110:37: note: 'std::end'
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
In file included from /usr/include/c++/11/string_view:48,
from /usr/include/c++/11/bits/basic_string.h:48,
from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/ext/pb_ds/tree_policy.hpp:45,
from staciakampis.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:562:42: note: 'std::ranges::__cust::end'
562 | inline constexpr __cust_access::_End end{};
| ^~~
/usr/include/c++/11/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
staciakampis.cpp:190:12: error: 'sz' was not declared in this scope
190 | ps(sz(res));
| ^~