dreaming.cpp: In function 'long long int dfs(int, int)':
dreaming.cpp:9:33: error: conversion from 'int' to non-scalar type 'std::pair<int, int>' requested
9 | for(pair<int, int> x : adj[u]){
| ^
dreaming.cpp: In function 'long long int dfs2(int, int)':
dreaming.cpp:20:33: error: conversion from 'int' to non-scalar type 'std::pair<int, int>' requested
20 | for(pair<int, int> x : adj[u]){
| ^
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:33:28: error: no matching function for call to 'std::vector<int>::push_back(std::pair<int, int>)'
33 | adj[A[i]].push_back(make_pair(B[i], T[i]));
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
from /usr/include/c++/13/functional:64,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53,
from dreaming.cpp:2:
/usr/include/c++/13/bits/stl_vector.h:1281:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1281 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1281:35: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const std::vector<int>::value_type&' {aka 'const int&'}
1281 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1298:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1298 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1298:30: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<int>::value_type&&' {aka 'int&&'}
1298 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
dreaming.cpp:34:28: error: no matching function for call to 'std::vector<int>::push_back(std::pair<int, int>)'
34 | adj[B[i]].push_back(make_pair(A[i], T[i]));
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1281:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1281 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1281:35: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const std::vector<int>::value_type&' {aka 'const int&'}
1281 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1298:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1298 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1298:30: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<int>::value_type&&' {aka 'int&&'}
1298 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
dreaming.cpp:40:24: error: 'n' was not declared in this scope
40 | for(int i = 0; i < n; i++){
| ^