/in/foo.cc: In function 'int main()':
/in/foo.cc:9:11: error: 'cin' was not declared in this scope
int n;cin>>n;
^~~
/in/foo.cc:9:11: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:75:0,
from /in/foo.cc:1:
/usr/include/c++/6/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
/in/foo.cc:13:45: error: 'max' was not declared in this scope
int a=max(nums[i+1].r,nums[i].l * nums[i].r);
^
/in/foo.cc:13:45: note: suggested alternative:
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h:3465:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/in/foo.cc:16:25: error: 'swap' was not declared in this scope
swap(nums[i],nums[i+1]);
^
/in/foo.cc:16:25: note: suggested alternatives:
In file included from /usr/include/c++/6/complex:45:0,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/sstream:783:5: note: 'std::__cxx11::swap'
swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
^~~~
In file included from /usr/include/c++/6/regex:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:110,
from /in/foo.cc:1:
/usr/include/c++/6/bits/regex.h:1958:5: note: 'std::__cxx11::swap'
swap(match_results<_Bi_iter, _Alloc>& __lhs,
^~~~
In file included from /usr/include/c++/6/exception:172:0,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/exception_ptr.h:164:5: note: 'std::__exception_ptr::swap'
swap(exception_ptr& __lhs, exception_ptr& __rhs)
^~~~
In file included from /usr/include/c++/6/bits/nested_exception.h:40:0,
from /usr/include/c++/6/exception:173,
from /usr/include/c++/6/ios:39,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/move.h:179:5: note: 'std::swap'
swap(_Tp& __a, _Tp& __b)
^~~~
/in/foo.cc:21:2: error: 'cout' was not declared in this scope
cout<<b;
^~~~
/in/foo.cc:21:2: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:75:0,
from /in/foo.cc:1:
/usr/include/c++/6/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
/in/foo.cc:21:8: error: 'b' was not declared in this scope
cout<<b;
^