F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39612465_9095.cpp: In function 'int main()':
0_0_39612465_9095.cpp:125:9: error: 'inc' was not declared in this scope; did you mean 'int'?
  125 |         inc >> t;
      |         ^~~
      |         int
0_0_39612465_9095.cpp:137:40: error: lvalue required as left operand of assignment
  137 |                                 if(cnt % 2 =1){
      |                                    ~~~~^~~
0_0_39612465_9095.cpp:151:30: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
  151 |                         cout >> q1.dequeue();
      |                         ~~~~ ^~ ~~~~~~~~~~~~
      |                         |                 |
      |                         |                 int
      |                         std::ostream {aka std::basic_ostream<char>}
0_0_39612465_9095.cpp:151:30: note: candidate: 'operator>>(int, int)' (built-in)
  151 |                         cout >> q1.dequeue();
      |                         ~~~~~^~~~~~~~~~~~~~~
0_0_39612465_9095.cpp:151:30: note:   no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:55,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_39612465_9095.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.tcc:823:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
  823 |     operator>>(basic_istream<_CharT, _Traits>& __in,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.tcc:823:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:44: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
  151 |                         cout >> q1.dequeue();
      |                                            ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/memory_resource.h:38,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:58:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cstddef:130:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
  130 |     operator>>(byte __b, _IntegerType __shift) noexcept
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cstddef:130:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:25: note:   cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
  151 |                         cout >> q1.dequeue();
      |                         ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:1106,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:42:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/istream.tcc:975:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
  975 |     operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/istream.tcc:975:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:44: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
  151 |                         cout >> q1.dequeue();
      |                                            ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:846:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
  846 |     operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:846:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:44: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
  151 |                         cout >> q1.dequeue();
      |                                            ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:851:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
  851 |     operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:851:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:44: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
  151 |                         cout >> q1.dequeue();
      |                                            ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:949:5: note: candidate: 'template<class _CharT, class _Traits, long long unsigned int _Num> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT (&)[_Num])'
  949 |     operator>>(basic_istream<_CharT, _Traits>& __in, _CharT (&__s)[_Num])
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:949:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:44: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
  151 |                         cout >> q1.dequeue();
      |                                            ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:958:5: note: candidate: 'template<class _Traits, long long unsigned int _Num> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char (&)[_Num])'
  958 |     operator>>(basic_istream<char, _Traits>& __in, unsigned char (&__s)[_Num])
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:958:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:44: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
  151 |                         cout >> q1.dequeue();
      |                                            ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:963:5: note: candidate: 'template<class _Traits, long long unsigned int _Num> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char (&)[_Num])'
  963 |     operator>>(basic_istream<char, _Traits>& __in, signed char (&__s)[_Num])
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:963:5: note:   template argument deduction/substitution failed:
0_0_39612465_9095.cpp:151:44: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
  151 |                         cout >> q1.dequeue();
      |                                            ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:1096:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
 1096 |     operator>>(_Istream&& __is, _Tp&& __x)
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:1096:5: note:   template argument deduction/substitution failed:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
0_0_39612465_9095.cpp:151:23:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:1096:5: error: template constraint failure for 'template<class _Is, class _Tp>  requires (__derived_from_ios_base<_Is>) && requires(_Is& __is, _Tp&& __t) {__is >> (forward<_Tp>)(__t);} using std::__rvalue_stream_extraction_t = _Is&&'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:1096:5: note: constraints not satisfied
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream: In substitution of 'template<class _Is, class _Tp>  requires (__derived_from_ios_base<_Is>) && requires(_Is& __is, _Tp&& __t) {__is >> (forward<_Tp>)(__t);} using std::__rvalue_stream_extraction_t = _Is&& [with _Is = std::basic_ostream<char>&; _Tp = int]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/istream:1096:5:   required by substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]'
0_0_39612465_9095.cpp:151:23:   required from here
D:/


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 00:12:25, Gzip enabled