Submission #00005
ソースコード
ステータス
項目 |
データ |
問題 |
0008 - クイックソート |
ユーザー名 |
ei2007
|
投稿日時 |
2021-01-12 16:23:16 |
言語 |
C++17 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
823 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘int par(int, int)’:
./Main.cpp:16:12: error: reference to ‘data’ is ambiguous
if(data[i]<=data[r]){
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
./Main.cpp:16:21: error: reference to ‘data’ is ambiguous
if(data[i]<=data[r]){
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
./Main.cpp:18:18: error: reference to ‘data’ is ambiguous
swap(data[i],data[j]);
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
./Main.cpp:18:26: error: reference to ‘data’ is ambiguous
swap(data[i],data[j]);
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
./Main.cpp:22:10: error: reference to ‘data’ is ambiguous
swap(data[j+1],data[r]);
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
./Main.cpp:22:20: error: reference to ‘data’ is ambiguous
swap(data[j+1],data[r]);
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
./Main.cpp: In function ‘int main()’:
./Main.cpp:42:14: error: reference to ‘data’ is ambiguous
cin>>data[i];
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
./Main.cpp:48:15: error: reference to ‘data’ is ambiguous
cout<<data[i]<<"\n";
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:51,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:318:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:309:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:299:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:289:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
./Main.cpp:11:13: note: ‘std::vector<int> data’
vector<int> data(100,0);
^~~~
セット
テストケース