QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#479491#4209. Stranded Far From Homeegypt_ioi2024b_05#Compile Error//C++202.0kb2024-07-15 18:01:452024-07-15 18:01:46

Details

answer.code: In function ‘int main()’:
answer.code:43:11: error: ‘class std::queue<int>’ has no member named ‘clear’
   43 |         q.clear();
      |           ^~~~~
answer.code:44:12: error: ‘class std::queue<int>’ has no member named ‘clear’
   44 |         q1.clear();
      |            ^~~~~
answer.code:67:16: error: ‘class std::queue<int>’ has no member named ‘clear’
   67 |             q2.clear();
      |                ^~~~~
answer.code:68:26: error: no matching function for call to ‘begin(std::queue<int>&)’
   68 |             for(int& j : q1){
      |                          ^~
In file included from /usr/include/c++/13/bits/algorithmfwd.h:39,
                 from /usr/include/c++/13/bits/stl_algo.h:59,
                 from /usr/include/c++/13/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:12:
/usr/include/c++/13/initializer_list:88:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/13/initializer_list:88:5: note:   template argument deduction/substitution failed:
answer.code:68:26: note:   ‘std::queue<int>’ is not derived from ‘std::initializer_list<_Tp>’
   68 |             for(int& j : q1){
      |                          ^~
In file included from /usr/include/c++/13/string:53,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52:
/usr/include/c++/13/bits/range_access.h:52:5: note: candidate: ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)’
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/13/bits/range_access.h:52:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/range_access.h: In substitution of ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::queue<int>]’:
answer.code:68:26:   required from here
/usr/include/c++/13/bits/range_access.h:52:50: error: ‘class std::queue<int>’ has no member named ‘begin’
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |                                           ~~~~~~~^~~~~
/usr/include/c++/13/bits/range_access.h:63:5: note: candidate: ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)’
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/13/bits/range_access.h:63:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/range_access.h: In substitution of ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::queue<int>]’:
answer.code:68:26:   required from here
/usr/include/c++/13/bits/range_access.h:63:56: error: ‘const class std::queue<int>’ has no member named ‘begin’
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |                                                 ~~~~~~~^~~~~
/usr/include/c++/13/bits/range_access.h:95:5: note: candidate: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])’
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/13/bits/range_access.h:95:5: note:   template argument deduction/substitution failed:
answer.code:68:26: note:   mismatched types ‘_Tp [_Nm]’ and ‘std::queue<int>’
   68 |             for(int& j : q1){
      |                          ^~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:166:
/usr/include/c++/13/valarray:1221:5: note: candidate: ‘template<class _Tp> _Tp* std::begin(valarray<_Tp>&)’
 1221 |     begin(valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/13/valarray:1221:5: note:   template argument deduction/substitution failed:
answer.code:68:26: note:   ‘std::queue<int>’ is not derived from ‘std::valarray<_Tp>’
   68 |             for(int& j : q1){
      |                          ^~
/usr/include/c++/13/valarray:1232:5: note: candidate: ‘template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)’
 1232 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/13/valarray:1232:5: note:   template argument deduction/substitution failed:
answer.code:68:26: note:   ‘std::queue<int>’ is not derived from ‘const std::valarray<_Tp>’
   68 |             for(int& j : q1){
      |                          ^~
answer.code:68:26: error: no matching function for call to ‘end(std::queue<int>&)’
/usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/13/initializer_list:99:5: note:   template argument deduction/substitution f...