toll.cpp: In function 'void setsz(int)':
toll.cpp:37:2: error: reference to 'size' is ambiguous
size = x;
^~~~
toll.cpp:24:5: note: candidates are: int size
int size;
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from toll.cpp:1:
/usr/include/c++/7/bits/range_access.h:252:5: note: template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])
size(const _Tp (&/*__array*/)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:242:5: note: template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)
size(const _Container& __cont) noexcept(noexcept(__cont.size()))
^~~~
toll.cpp: In function 'void reset()':
toll.cpp:41:21: error: reference to 'size' is ambiguous
for(int i = 1; i<= size; i++) par[i] = i;
^~~~
toll.cpp:24:5: note: candidates are: int size
int size;
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from toll.cpp:1:
/usr/include/c++/7/bits/range_access.h:252:5: note: template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])
size(const _Tp (&/*__array*/)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:242:5: note: template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)
size(const _Container& __cont) noexcept(noexcept(__cont.size()))
^~~~
toll.cpp: In function 'int main()':
toll.cpp:121:33: warning: pointer to a function used in arithmetic [-Wpointer-arith]
treecomp[i] = treecomp[pong[i]];
^
toll.cpp:121:34: error: invalid types 'int [100005][int(int)]' for array subscript
treecomp[i] = treecomp[pong[i]];
^
toll.cpp:149:10: error: 'edges' was not declared in this scope
vector<edges> gas;
^~~~~
toll.cpp:149:10: note: suggested alternative: 'edge'
vector<edges> gas;
^~~~~
edge
toll.cpp:149:15: error: template argument 1 is invalid
vector<edges> gas;
^
toll.cpp:149:15: error: template argument 2 is invalid
toll.cpp:2:12: error: request for member 'push_back' in 'gas', which is of non-class type 'int'
#define pb push_back
^
toll.cpp:153:19: note: in expansion of macro 'pb'
if(a == b) gas.pb(soft[i]);
^~
toll.cpp:162:31: error: request for member 'size' in 'gas', which is of non-class type 'int'
for(int i = 0; i< (int) gas.size(); i++)
^~~~
toll.cpp:164:26: error: invalid types 'int[int]' for array subscript
int u = treecomp[gas[i].u], v = treecomp[gas[i].v];
^
toll.cpp:165:17: error: invalid types 'int[int]' for array subscript
int w = gas[i].w;
^
toll.cpp:166:19: error: 'v' was not declared in this scope
if(dep[u]< dep[v]) swap(u, v);
^
toll.cpp:167:22: error: 'v' was not declared in this scope
while(dep[u]> dep[v])
^
toll.cpp:172:15: error: 'v' was not declared in this scope
while(u != v)
^
toll.cpp:64:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &n, &m, &k);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
toll.cpp:69:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int u, v, w; scanf("%d %d %d", &u, &v, &w);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
toll.cpp:74:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int u, v; scanf("%d %d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~~
toll.cpp:77:34: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i = 1; i<= n; i++) scanf("%d", &sz[i]);
~~~~~^~~~~~~~~~~~~~