/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:90:21: error: 'swap' was not declared in this scope
    if (a>b) swap(a,b);
                     ^
/in/foo.cc:90:21: note: suggested alternatives:
In file included from /usr/include/c++/6/string:52:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/basic_string.h:5302:5: note:   'std::swap'
     swap(basic_string<_CharT, _Traits, _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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/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/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/move.h:179:5: note:   'std::swap'
     swap(_Tp& __a, _Tp& __b)
     ^~~~

信息

递交者
类型
递交
题目
P1083 小白逛公园
语言
C++
递交时间
2017-04-22 08:59:26
评测时间
2017-04-22 08:59:26
评测机
分数
0
总耗时
496ms
峰值内存
27.863 MiB