Submission #71361


ソースコード

ステータス

項目 データ
問題 0003 - 聖書
ユーザー名 r2213
投稿日時 2022-07-20 17:26:08
言語 C++17
状態 Compile Error
得点 0
ソースコード長 224 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:14: error: no match for ‘operator>’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’})
     while(cin>s){
           ~~~^~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:64,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_pair.h:462:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)’
     operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_pair.h:462:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::pair<_T1, _T2>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:317:5: note: candidate: ‘template<class _Iterator> constexpr bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)’
     operator>(const reverse_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:317:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::reverse_iterator<_Iterator>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:355:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)’
     operator>(const reverse_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:355:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::reverse_iterator<_Iterator>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:1160:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)’
     operator>(const move_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:1160:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::move_iterator<_IteratorL>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:1166:5: note: candidate: ‘template<class _Iterator> constexpr bool std::operator>(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)’
     operator>(const move_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:1166:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::move_iterator<_IteratorL>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:48,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
                 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/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:490:5: note: candidate: ‘template<class _CharT, class _Traits> constexpr bool std::operator>(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)’
     operator> (basic_string_view<_CharT, _Traits> __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:490:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::basic_istream<char>’ is not derived from ‘std::basic_string_view<_CharT, _Traits>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:48,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
                 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/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:496:5: note: candidate: ‘template<class _CharT, class _Traits> constexpr bool std::operator>(std::basic_string_view<_CharT, _Traits>, std::__detail::__idt<std::basic_string_view<_CharT, _Traits> >)’
     operator> (basic_string_view<_CharT, _Traits> __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:496:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::basic_istream<char>’ is not derived from ‘std::basic_string_view<_CharT, _Traits>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:48,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
                 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/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:502:5: note: candidate: ‘template<class _CharT, class _Traits> constexpr bool std::operator>(std::__detail::__idt<std::basic_string_view<_CharT, _Traits> >, std::basic_string_view<_CharT, _Traits>)’
     operator> (__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:502:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::__cxx11::basic_string<char>’ is not derived from ‘std::basic_string_view<_CharT, _Traits>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
                 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/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6162:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6162:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
                 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/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6175:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)’
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6175:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
                 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/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6187:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
     operator>(const _CharT* __lhs,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6187:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   mismatched types ‘const _CharT*’ and ‘std::basic_istream<char>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:903:5: note: candidate: ‘template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator>(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)’
     operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:903:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const __gnu_cxx::__normal_iterator<_IteratorL, _Container>’
     while(cin>s){
               ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:910:5: note: candidate: ‘template<class _Iterator, class _Container> bool __gnu_cxx::operator>(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)’
     operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:910:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:15: note:   ‘std::istream’ {aka ‘std::basic_istream<char>’} is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’
     while(cin>s){
               ^
./Main.cpp:10:13: error: ‘t’ was not declared in this scope
             t++;
             ^
./Main.cpp:13:11: error: ‘t’ was not declared in this scope
     cout<<t;
           ^

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #