railroad.cpp: In function 'long long int plan_roller_coaster(std::vector<int>, std::vector<int>)':
railroad.cpp:61:33: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
else if(cur == 0) v.push_back({i, i-1, crd[i] - crd[i-1]});
^
railroad.cpp:61:60: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
else if(cur == 0) v.push_back({i, i-1, crd[i] - crd[i-1]});
^
railroad.cpp:64:6: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for(auto &i : v){
^
railroad.cpp:64:12: error: ISO C++ forbids declaration of 'i' with no type [-fpermissive]
for(auto &i : v){
^
railroad.cpp:64:16: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for(auto &i : v){
^
railroad.cpp:65:17: error: request for member 's' in 'i', which is of non-class type 'int'
if(disj.uni(i.s, i.e)) ans += i.x;
^
railroad.cpp:65:22: error: request for member 'e' in 'i', which is of non-class type 'int'
if(disj.uni(i.s, i.e)) ans += i.x;
^
railroad.cpp:65:35: error: request for member 'x' in 'i', which is of non-class type 'int'
if(disj.uni(i.s, i.e)) ans += i.x;
^