dreaming.cpp: In function 'std::pair<int, long long int> dfs(int, long long int, int)':
dreaming.cpp:11:2: error: reference to 'distance' is ambiguous
11 | distance[at][id] = dist;
| ^~~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from dreaming.cpp:2:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:138:5: note: candidates are: 'template<class _InputIterator> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::distance(_InputIterator, _InputIterator)'
138 | distance(_InputIterator __first, _InputIterator __last)
| ^~~~~~~~
dreaming.cpp:6:11: note: 'long long int distance [100100][2]'
6 | long long distance[100100][2];
| ^~~~~~~~
dreaming.cpp:13:6: error: reference to 'distance' is ambiguous
13 | if(distance[at][0] + dist == path){
| ^~~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from dreaming.cpp:2:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:138:5: note: candidates are: 'template<class _InputIterator> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::distance(_InputIterator, _InputIterator)'
138 | distance(_InputIterator __first, _InputIterator __last)
| ^~~~~~~~
dreaming.cpp:6:11: note: 'long long int distance [100100][2]'
6 | long long distance[100100][2];
| ^~~~~~~~
dreaming.cpp:14:31: error: reference to 'distance' is ambiguous
14 | c.insert(make_pair(at, max(distance[at][0], dist)));
| ^~~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from dreaming.cpp:2:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:138:5: note: candidates are: 'template<class _InputIterator> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::distance(_InputIterator, _InputIterator)'
138 | distance(_InputIterator __first, _InputIterator __last)
| ^~~~~~~~
dreaming.cpp:6:11: note: 'long long int distance [100100][2]'
6 | long long distance[100100][2];
| ^~~~~~~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:30:14: error: 'class std::vector<std::pair<int, long long int> >' has no member named 'pb'
30 | G[A[i]].pb(mp(B[i], T[i]));
| ^~
dreaming.cpp:30:17: error: 'mp' was not declared in this scope
30 | G[A[i]].pb(mp(B[i], T[i]));
| ^~
dreaming.cpp:31:14: error: 'class std::vector<std::pair<int, long long int> >' has no member named 'pb'
31 | G[B[i]].pb(mp(A[i], T[i]));
| ^~
dreaming.cpp:38:40: error: too few arguments to function 'std::pair<int, long long int> dfs(int, long long int, int)'
38 | pair<int, long long> a = dfs(0, 0);
| ^
dreaming.cpp:9:23: note: declared here
9 | pair<int, long long > dfs(int at, long long dist, int id){
| ^~~
dreaming.cpp:39:46: error: too few arguments to function 'std::pair<int, long long int> dfs(int, long long int, int)'
39 | pair<int, long long> b = dfs(a.first, 0); // a i b kraevi na diameter
| ^
dreaming.cpp:9:23: note: declared here
9 | pair<int, long long > dfs(int at, long long dist, int id){
| ^~~
dreaming.cpp:41:46: error: too few arguments to function 'std::pair<int, long long int> dfs(int, long long int, int)'
41 | pair<int, long long> s = dfs(a.first, 0);
| ^
dreaming.cpp:9:23: note: declared here
9 | pair<int, long long > dfs(int at, long long dist, int id){
| ^~~
dreaming.cpp:42:11: error: 'class std::vector<std::pair<int, long long int> >' has no member named 'pb'
42 | arr.pb(*c.begin());
| ^~
dreaming.cpp:41:28: warning: unused variable 's' [-Wunused-variable]
41 | pair<int, long long> s = dfs(a.first, 0);
| ^