swap.cpp: In function 'void copy(int)':
swap.cpp:20:6: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for(auto &i : q) tmp[x].pb(i);
^
swap.cpp:20:12: error: ISO C++ forbids declaration of 'i' with no type [-fpermissive]
for(auto &i : q) tmp[x].pb(i);
^
swap.cpp:20:16: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for(auto &i : q) tmp[x].pb(i);
^
swap.cpp: In function 'int main()':
swap.cpp:69:8: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for(auto &j : tmp[i]){
^
swap.cpp:69:14: error: ISO C++ forbids declaration of 'j' with no type [-fpermissive]
for(auto &j : tmp[i]){
^
swap.cpp:69:18: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for(auto &j : tmp[i]){
^
swap.cpp:25:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&N);
^
swap.cpp:27:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
^