souvenirs.cpp:7:1: error: 'vector' does not name a type
7 | vector<ll>p;
| ^~~~~~
souvenirs.cpp:8:1: error: 'vector' does not name a type
8 | vector<int>cnt;
| ^~~~~~
souvenirs.cpp:9:21: error: 'vector' has not been declared
9 | int Refresh(ll &sum,vector<int>&cur)
| ^~~~~~
souvenirs.cpp:9:27: error: expected ',' or '...' before '<' token
9 | int Refresh(ll &sum,vector<int>&cur)
| ^
souvenirs.cpp: In function 'int Refresh(long long int&, int)':
souvenirs.cpp:11:13: error: 'cur' was not declared in this scope
11 | int old=cur.size();
| ^~~
souvenirs.cpp:12:5: error: 'set' was not declared in this scope
12 | set<int>s;
| ^~~
souvenirs.cpp:12:5: note: suggested alternatives:
In file included from /usr/include/c++/11/set:61,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:87,
from souvenirs.cpp:2:
/usr/include/c++/11/bits/stl_set.h:94:11: note: 'std::set'
94 | class set
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:87,
from souvenirs.cpp:2:
/usr/include/c++/11/set:78:13: note: 'std::pmr::set'
78 | using set = std::set<_Key, _Cmp, polymorphic_allocator<_Key>>;
| ^~~
souvenirs.cpp:12:9: error: expected primary-expression before 'int'
12 | set<int>s;
| ^~~
souvenirs.cpp:15:9: error: 's' was not declared in this scope
15 | s.insert(v);
| ^
souvenirs.cpp:19:12: error: 'p' was not declared in this scope
19 | if(p[v]!=-1)
| ^
souvenirs.cpp:22:13: error: 's' was not declared in this scope
22 | s.erase(v);
| ^
souvenirs.cpp:26:15: error: 's' was not declared in this scope
26 | for(int v:s)cur.push_back(v);
| ^
souvenirs.cpp: At global scope:
souvenirs.cpp:29:23: error: 'vector' has not been declared
29 | void dfs(int u,ll sum,vector<int>cur)
| ^~~~~~
souvenirs.cpp:29:29: error: expected ',' or '...' before '<' token
29 | void dfs(int u,ll sum,vector<int>cur)
| ^
souvenirs.cpp: In function 'void dfs(int, long long int, int)':
souvenirs.cpp:37:8: error: 'cur' was not declared in this scope
37 | if(cur.size()==1)
| ^~~
souvenirs.cpp:39:9: error: 'p' was not declared in this scope
39 | p[u]=sum;
| ^
souvenirs.cpp:42:17: error: 'cur' was not declared in this scope
42 | Refresh(sum,cur);
| ^~~
souvenirs.cpp:48:13: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
48 | pair<vi,ll>nxt=transaction(nxt_sum);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/utility:70,
from souvenirs.h:1,
from souvenirs.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
souvenirs.cpp:4:12: error: 'vector' was not declared in this scope
4 | #define vi vector<int>
| ^~~~~~
souvenirs.cpp:48:18: note: in expansion of macro 'vi'
48 | pair<vi,ll>nxt=transaction(nxt_sum);
| ^~
souvenirs.cpp:4:12: note: suggested alternatives:
4 | #define vi vector<int>
| ^~~~~~
souvenirs.cpp:48:18: note: in expansion of macro 'vi'
48 | pair<vi,ll>nxt=transaction(nxt_sum);
| ^~
In file included from /usr/include/c++/11/vector:67,
from souvenirs.h:2,
from souvenirs.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 souvenirs.h:2,
from souvenirs.cpp:1:
/usr/include/c++/11/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
souvenirs.cpp:4:19: error: expected primary-expression before 'int'
4 | #define vi vector<int>
| ^~~
souvenirs.cpp:48:18: note: in expansion of macro 'vi'
48 | pair<vi,ll>nxt=transaction(nxt_sum);
| ^~
souvenirs.cpp:49:23: error: 'nxt' was not declared in this scope
49 | for(int v:nxt.fi)cnt[v]++;
| ^~~
souvenirs.cpp:49:30: error: 'cnt' was not declared in this scope; did you mean 'int'?
49 | for(int v:nxt.fi)cnt[v]++;
| ^~~
| int
souvenirs.cpp:50:17: error: 'nxt' was not declared in this scope
50 | dfs(nxt.fi[0],nxt_sum-nxt.se,nxt.fi);
| ^~~
souvenirs.cpp:52:21: error: 'p' was not declared in this scope
52 | nxt_sum=p[nxt.fi[0]]-1;
| ^
souvenirs.cpp:56:13: error: 'p' was not declared in this scope
56 | p[u]=sum;
| ^
souvenirs.cpp: In function 'void buy_souvenirs(int, long long int)':
souvenirs.cpp:63:5: error: 'p' was not declared in this scope
63 | p=vector<ll>(n,-1);
| ^
souvenirs.cpp:63:7: error: 'vector' was not declared in this scope
63 | p=vector<ll>(n,-1);
| ^~~~~~
souvenirs.cpp:63:7: note: suggested alternatives:
In file included from /usr/include/c++/11/vector:67,
from souvenirs.h:2,
from souvenirs.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 souvenirs.h:2,
from souvenirs.cpp:1:
/usr/include/c++/11/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
souvenirs.cpp:3:12: error: expected primary-expression before 'long'
3 | #define ll long long
| ^~~~
souvenirs.cpp:63:14: note: in expansion of macro 'll'
63 | p=vector<ll>(n,-1);
| ^~
souvenirs.cpp:65:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
65 | cnt=vector<int>(n,0);
| ^~~
| int
souvenirs.cpp:65:16: error: expected primary-expression before 'int'
65 | cnt=vector<int>(n,0);
| ^~~
souvenirs.cpp:71:13: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
71 | pair<vi,ll>nxt=transaction(nxt_sum);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/utility:70,
from souvenirs.h:1,
from souvenirs.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
souvenirs.cpp:4:19: error: expected primary-expression before 'int'
4 | #define vi vector<int>
| ^~~
souvenirs.cpp:71:18: note: in expansion of macro 'vi'
71 | pair<vi,ll>nxt=transaction(nxt_sum);
| ^~
souvenirs.cpp:72:23: error: 'nxt' was not declared in this scope
72 | for(int v:nxt.fi)cnt[v]++;
| ^~~
souvenirs.cpp:73:22: error: 'nxt' was not declared in this scope
73 | nxt_sum-=nxt.se;
| ^~~