passport.cpp: In function 'void update(int, int, int, int, int, int)':
passport.cpp:13:16: error: 'a' was not declared in this scope
13 | z[id + a].push_back({t, 1});
| ^
passport.cpp: In function 'void build(int, int, int)':
passport.cpp:23:30: error: 'a' was not declared in this scope
23 | z[l].push_back({id + a, 0});
| ^
passport.cpp:23:23: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::push_back(<brace-enclosed initializer list>)'
23 | z[l].push_back({id + a, 0});
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~
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 passport.cpp:1:
/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 = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long 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 '<brace-enclosed initializer list>' to 'const std::vector<std::pair<long long int, long long int> >::value_type&' {aka 'const std::pair<long long int, long long 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 = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long 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 '<brace-enclosed initializer list>' to 'std::vector<std::pair<long long int, long long int> >::value_type&&' {aka 'std::pair<long long int, long long int>&&'}
1298 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
passport.cpp:29:16: error: 'a' was not declared in this scope
29 | z[id * 2 + a].push_back({id + a, 0});
| ^
passport.cpp: In function 'void dijkstra()':
passport.cpp:54:25: error: 'a' was not declared in this scope
54 | for(int i = 1; i <= a; ++i){
| ^
passport.cpp: In function 'int main()':
passport.cpp:75:13: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
75 | scanf("%d", &n);
| ~^ ~~
| | |
| | long long int*
| int*
| %lld
passport.cpp:87:9: error: 'a' was not declared in this scope
87 | bfs(a, 1);
| ^
passport.cpp:75:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
75 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
passport.cpp:78:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
78 | scanf("%d%d", &x, &y);
| ~~~~~^~~~~~~~~~~~~~~~
passport.cpp:95:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
95 | scanf("%d", &c);
| ~~~~~^~~~~~~~~~
passport.cpp:98:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
98 | scanf("%d", &x);
| ~~~~~^~~~~~~~~~