mart.cpp: In function 'std::pair<int, int> mx(std::map<int, int>&)':
mart.cpp:22:7: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for (auto &p : m){
^
mart.cpp:22:13: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
for (auto &p : m){
^
mart.cpp:22:17: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for (auto &p : m){
^
mart.cpp:23:17: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
ret = max(ret,{p.second,p.first});
^
mart.cpp:23:20: error: request for member 'second' in 'p', which is of non-class type 'int'
ret = max(ret,{p.second,p.first});
^
mart.cpp:23:29: error: request for member 'first' in 'p', which is of non-class type 'int'
ret = max(ret,{p.second,p.first});
^
mart.cpp:23:35: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
ret = max(ret,{p.second,p.first});
^
mart.cpp:23:35: error: no matching function for call to 'max(std::pair<int, int>&, <brace-enclosed initializer list>)'
In file included from /usr/include/c++/5/algorithm:61:0,
from mart.cpp:2:
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: candidate: const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = std::pair<int, int>]
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: no known conversion for argument 2 from '<brace-enclosed initializer list>' to 'const std::pair<int, int>&'
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
mart.cpp:23:35: note: candidate expects 3 arguments, 2 provided
ret = max(ret,{p.second,p.first});
^
mart.cpp: In function 'int main()':
mart.cpp:34:10: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
Q.push({x,x,0});
^
mart.cpp:34:17: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
Q.push({x,x,0});
^
mart.cpp:40:18: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
G[x].push_back({y,c});
^
mart.cpp:40:23: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
G[x].push_back({y,c});
^
mart.cpp:41:18: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
G[y].push_back({x,c});
^
mart.cpp:41:23: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
G[y].push_back({x,c});
^
mart.cpp:47:8: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for (auto &p : G[x]){
^
mart.cpp:47:14: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
for (auto &p : G[x]){
^
mart.cpp:47:18: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for (auto &p : G[x]){
^
mart.cpp:48:14: error: request for member 'first' in 'p', which is of non-class type 'int'
int y = p.first;
^
mart.cpp:49:19: error: request for member 'second' in 'p', which is of non-class type 'int'
int nc = c + p.second;
^
mart.cpp:54:6: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
auto p = mx(dist[y]);
^
mart.cpp:54:11: error: 'p' does not name a type
auto p = mx(dist[y]);
^
mart.cpp:55:22: error: request for member 'second' in 'p', which is of non-class type 'int'
dist[y].erase(p.second);
^
mart.cpp:57:12: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
Q.push({s,y,nc});
^
mart.cpp:57:20: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
Q.push({s,y,nc});
^
mart.cpp:70:8: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for (auto &p : dist[x]){
^
mart.cpp:70:14: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
for (auto &p : dist[x]){
^
mart.cpp:70:18: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for (auto &p : dist[x]){
^
mart.cpp:71:16: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
u.push_back({p.second,p.first});
^
mart.cpp:71:19: error: request for member 'second' in 'p', which is of non-class type 'int'
u.push_back({p.second,p.first});
^
mart.cpp:71:28: error: request for member 'first' in 'p', which is of non-class type 'int'
u.push_back({p.second,p.first});
^
mart.cpp:71:34: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
u.push_back({p.second,p.first});
^
mart.cpp:71:34: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
In file included from /usr/include/c++/5/vector:64:0,
from mart.cpp:3:
/usr/include/c++/5/bits/stl_vector.h:913:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(const value_type& __x)
^
/usr/include/c++/5/bits/stl_vector.h:913:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
mart.cpp:74:8: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for (auto &p : u){
^
mart.cpp:74:14: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
for (auto &p : u){
^
mart.cpp:74:18: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for (auto &p : u){
^
mart.cpp:75:20: error: request for member 'second' in 'p', which is of non-class type 'int'
if(!chk.count(p.second)){
^
mart.cpp:76:25: error: request for member 'second' in 'p', which is of non-class type 'int'
printf ("%d %d\n",p.second,p.first);
^
mart.cpp:76:34: error: request for member 'first' in 'p', which is of non-class type 'int'
printf ("%d %d\n",p.second,p.first);
^
mart.cpp:30:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d %d %d",&N,&M,&K,&q);
^
mart.cpp:32:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int x; scanf ("%d",&x);
^
mart.cpp:39:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d %d",&x,&y,&c);
^
mart.cpp:65:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d",&x,&n); while (n--){
^
mart.cpp:66:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int t; scanf ("%d",&t); chk.insert(t);
^