Submission #00135


ソースコード

ステータス

項目 データ
問題 0004 - 強欲な壺
ユーザー名 Koba_gochiusa
投稿日時 2023-07-18 18:04:13
言語 C++
状態 Compile Error
得点 0
ソースコード長 957 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:28:14: error: ‘i’ does not name a type
     for(auto i = a.begin();i != a.end();i ++){
              ^
./Main.cpp:28:28: error: expected ‘;’ before ‘i’
     for(auto i = a.begin();i != a.end();i ++){
                            ^
                            ;
./Main.cpp:28:28: error: name lookup of ‘i’ changed for ISO ‘for’ scoping [-fpermissive]
./Main.cpp:28:28: note: if you use ‘-fpermissive’ G++ will accept your code
./Main.cpp:28:30: error: no match for ‘operator!=’ (operand types are ‘int’ and ‘std::map<int, int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const int, int> >’})
     for(auto i = a.begin();i != a.end();i ++){
                            ~~^~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/utility:70,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:60,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_pair.h:456:5: note: candidate: ‘template<class _T1, class _T2> 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:456:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
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/algorithm:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:311:5: note: candidate: ‘template<class _Iterator> 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:311:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
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/algorithm:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:349:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> 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:349:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/ext/alloc_traits.h:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_tempbuf.h:60,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:158:5: note: candidate: ‘template<class _T1, class _T2> bool std::operator!=(const std::allocator<_Tp1>&, const std::allocator<_T2>&)’
     operator!=(const allocator<_T1>&, const allocator<_T2>&)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:158:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::allocator<_Tp1>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/ext/alloc_traits.h:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_tempbuf.h:60,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:164:5: note: candidate: ‘template<class _Tp> bool std::operator!=(const std::allocator<_Tp1>&, const std::allocator<_Tp1>&)’
     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:164:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::allocator<_Tp1>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bitset:47,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:66,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/postypes.h:221:5: note: candidate: ‘template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)’
     operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/postypes.h:221:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::fpos<_StateT>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
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/bitset:47,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:66,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6086:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6086:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
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/bitset:47,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:66,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6099:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
     operator!=(const _CharT* __lhs,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6099:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const _CharT*’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
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/bitset:47,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:66,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6111:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, 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:6111:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_facets.h:48,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_ios.h:37,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:44,
                 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/x86_64-pc-linux-gnu/bits/stdc++.h:67,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/streambuf_iterator.h:209:5: note: candidate: ‘template<class _CharT, class _Traits> bool std::operator!=(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)’
     operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/streambuf_iterator.h:209:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::istreambuf_iterator<_CharT, _Traits>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:67,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/complex:476:5: note: candidate: ‘template<class _Tp> bool std::operator!=(const std::complex<_Tp>&, const std::complex<_Tp>&)’
     operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/complex:476:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::complex<_Tp>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:67,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/complex:481:5: note: candidate: ‘template<class _Tp> bool std::operator!=(const std::complex<_Tp>&, const _Tp&)’
     operator!=(const complex<_Tp>& __x, const _Tp& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/complex:481:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::complex<_Tp>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:67,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/complex:486:5: note: candidate: ‘template<class _Tp> bool std::operator!=(const _Tp&, const std::complex<_Tp>&)’
     operator!=(const _Tp& __x, const complex<_Tp>& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/complex:486:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   ‘std::map<int, int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const int, int> >’} is not derived from ‘const std::complex<_Tp>’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/deque:64,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:68,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_deque.h:281:5: note: candidate: ‘template<class _Tp, class _Ref, class _Ptr> bool std::operator!=(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)’
     operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_deque.h:281:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_Deque_iterator<_Tp, _Ref, _Ptr>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/deque:64,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:68,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_deque.h:288:5: note: candidate: ‘template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> bool std::operator!=(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)’
     operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_deque.h:288:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_Deque_iterator<_Tp, _Ref, _Ptr>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/deque:64,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:68,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_deque.h:2303:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator!=(const std::deque<_Tp, _Alloc>&, const std::deque<_Tp, _Alloc>&)’
     operator!=(const deque<_Tp, _Alloc>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_deque.h:2303:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::deque<_Tp, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/iterator:66,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:77,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stream_iterator.h:137:5: note: candidate: ‘template<class _Tp, class _CharT, class _Traits, class _Dist> bool std::operator!=(const std::istream_iterator<_Tp, _CharT, _Traits, _Dist>&, const std::istream_iterator<_Tp, _CharT, _Traits, _Dist>&)’
     operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stream_iterator.h:137:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::istream_iterator<_Tp, _CharT, _Traits, _Dist>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/list:63,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:79,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_list.h:350:5: note: candidate: ‘template<class _Val> bool std::operator!=(const std::_List_iterator<_Tp>&, const std::_List_const_iterator<_Tp>&)’
     operator!=(const _List_iterator<_Val>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_list.h:350:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_List_iterator<_Tp>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/list:63,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:79,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_list.h:2027:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator!=(const std::__cxx11::list<_Tp, _Alloc>&, const std::__cxx11::list<_Tp, _Alloc>&)’
     operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_list.h:2027:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::__cxx11::list<_Tp, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/map:60,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:81,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_tree.h:412:5: note: candidate: ‘template<class _Val> bool std::operator!=(const std::_Rb_tree_iterator<_Tp>&, const std::_Rb_tree_const_iterator<_Val>&)’
     operator!=(const _Rb_tree_iterator<_Val>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_tree.h:412:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_Rb_tree_iterator<_Tp>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/map:60,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:81,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_tree.h:1569:5: note: candidate: ‘template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator!=(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)’
     operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_tree.h:1569:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/map:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:81,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_map.h:1459:5: note: candidate: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator!=(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)’
     operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_map.h:1459:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::map<_Key, _Tp, _Compare, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/map:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:81,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_multimap.h:1124:5: note: candidate: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator!=(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)’
     operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_multimap.h:1124:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:64,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/queue:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:86,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:1777:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator!=(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)’
     operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:1777:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/queue:64,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:86,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_queue.h:342:5: note: candidate: ‘template<class _Tp, class _Seq> bool std::operator!=(const std::queue<_Tp, _Seq>&, const std::queue<_Tp, _Seq>&)’
     operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_queue.h:342:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::queue<_Tp, _Seq>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/set:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:87,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_set.h:982:5: note: candidate: ‘template<class _Key, class _Compare, class _Alloc> bool std::operator!=(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)’
     operator!=(const set<_Key, _Compare, _Alloc>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_set.h:982:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::set<_Key, _Compare, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/set:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:87,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_multiset.h:967:5: note: candidate: ‘template<class _Key, class _Compare, class _Alloc> bool std::operator!=(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)’
     operator!=(const multiset<_Key, _Compare, _Alloc>& __x,
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_multiset.h:967:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::multiset<_Key, _Compare, _Alloc>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/stack:61,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:89,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_stack.h:317:5: note: candidate: ‘template<class _Tp, class _Seq> bool std::operator!=(const std::stack<_Tp, _Seq>&, const std::stack<_Tp, _Seq>&)’
     operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
     ^~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_stack.h:317:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::stack<_Tp, _Seq>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:592,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<std::_BinClos<std::__not_equal_to, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__not_equal_to, typename _Dom1::value_type>::result_type> std::operator!=(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)’
     _DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:592,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note: candidate: ‘template<class _Dom> std::_Expr<std::_BinClos<std::__not_equal_to, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__not_equal_to, typename _Dom1::value_type>::result_type> std::operator!=(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)’
     _DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:592,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note: candidate: ‘template<class _Dom> std::_Expr<std::_BinClos<std::__not_equal_to, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__not_equal_to, typename _Dom1::value_type>::result_type> std::operator!=(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)’
     _DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   ‘std::map<int, int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const int, int> >’} is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:592,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note: candidate: ‘template<class _Dom> std::_Expr<std::_BinClos<std::__not_equal_to, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__not_equal_to, typename _Dom1::value_type>::result_type> std::operator!=(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)’
     _DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:592,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note: candidate: ‘template<class _Dom> std::_Expr<std::_BinClos<std::__not_equal_to, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__not_equal_to, typename _Dom1::value_type>::result_type> std::operator!=(const std::valarray<typename _Dom::value_type>&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)’
     _DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/valarray_after.h:415:5: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   ‘std::map<int, int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const int, int> >’} is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:1185:1: note: candidate: ‘template<class _Tp> std::_Expr<std::_BinClos<std::__not_equal_to, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__not_equal_to, _Tp>::result_type> std::operator!=(const std::valarray<_Tp>&, const std::valarray<_Tp>&)’
 _DEFINE_BINARY_OPERATOR(!=, __not_equal_to)
 ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:1185:1: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::valarray<_Tp>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:1185:1: note: candidate: ‘template<class _Tp> std::_Expr<std::_BinClos<std::__not_equal_to, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__not_equal_to, _Tp>::result_type> std::operator!=(const std::valarray<_Tp>&, const _Tp&)’
 _DEFINE_BINARY_OPERATOR(!=, __not_equal_to)
 ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:1185:1: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   mismatched types ‘const std::valarray<_Tp>’ and ‘int’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:95,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:1185:1: note: candidate: ‘template<class _Tp> std::_Expr<std::_BinClos<std::__not_equal_to, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__not_equal_to, _Tp>::result_type> std::operator!=(const _Tp&, const std::valarray<_Tp>&)’
 _DEFINE_BINARY_OPERATOR(!=, __not_equal_to)
 ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/valarray:1185:1: note:   template argument deduction/substitution failed:
./Main.cpp:28:39: note:   ‘std::map<int, int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const int, int> >’} is not derived from ‘const std::valarray<_Tp>’
     for(auto i = a.begin();i != a.end();i ++){
                                       ^
./Main.cpp:29:14: error: base operand of ‘->’ is not a pointer
         if(i -> second == ma) cout << i -> first fin;
              ^~
./Main.cpp:29:41: error: base operand of ‘->’ is not a pointer
         if(i -> second == ma) cout << i -> first fin;
                                         ^~

セット

セット 得点 Cases

テストケース

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