Job 7339

Owner
Philip Dumitru
Problem
Bosses
Contest
MindCoding 2015 Round 1
Source
1.36KB
Result
Compile error (Non-zero exit status: 1)

Compiler output

prog.cpp: In function 'int ask(int, int)':
prog.cpp:51:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: In function 'int main()':
prog.cpp:73:22: error: 'x' was not declared in this scope
prog.cpp:73:32: error: 'y' was not declared in this scope
prog.cpp:75:37: error: no match for 'operator<' in 'std::cout.std::basic_ostream<_CharT, _Traits>::operator<< <char, std::char_traits<char> >(parent[i]) < '\012''
prog.cpp:75:37: note: candidates are:
In file included from /usr/include/c++/4.7/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.7/bits/char_traits.h:41,
                 from /usr/include/c++/4.7/ios:41,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/stl_pair.h:212:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
/usr/include/c++/4.7/bits/stl_pair.h:212:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
                 from /usr/include/c++/4.7/bits/char_traits.h:41,
                 from /usr/include/c++/4.7/ios:41,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/stl_iterator.h:299:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.7/bits/stl_iterator.h:299:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
                 from /usr/include/c++/4.7/bits/char_traits.h:41,
                 from /usr/include/c++/4.7/ios:41,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/stl_iterator.h:349:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
/usr/include/c++/4.7/bits/stl_iterator.h:349:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_IteratorL>'
In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
                 from /usr/include/c++/4.7/bits/char_traits.h:41,
                 from /usr/include/c++/4.7/ios:41,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/stl_iterator.h:1057:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
/usr/include/c++/4.7/bits/stl_iterator.h:1057:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
                 from /usr/include/c++/4.7/bits/char_traits.h:41,
                 from /usr/include/c++/4.7/ios:41,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/stl_iterator.h:1063:5: note: template<class _Iterator> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
/usr/include/c++/4.7/bits/stl_iterator.h:1063:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_Iterator>'
In file included from /usr/include/c++/4.7/string:54:0,
                 from /usr/include/c++/4.7/bits/locale_classes.h:42,
                 from /usr/include/c++/4.7/bits/ios_base.h:43,
                 from /usr/include/c++/4.7/ios:43,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/basic_string.h:2566:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
/usr/include/c++/4.7/bits/basic_string.h:2566:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
In file included from /usr/include/c++/4.7/string:54:0,
                 from /usr/include/c++/4.7/bits/locale_classes.h:42,
                 from /usr/include/c++/4.7/bits/ios_base.h:43,
                 from /usr/include/c++/4.7/ios:43,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/basic_string.h:2578:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
/usr/include/c++/4.7/bits/basic_string.h:2578:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
In file included from /usr/include/c++/4.7/string:54:0,
                 from /usr/include/c++/4.7/bits/locale_classes.h:42,
                 from /usr/include/c++/4.7/bits/ios_base.h:43,
                 from /usr/include/c++/4.7/ios:43,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/4.7/bits/basic_string.h:2590:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
/usr/include/c++/4.7/bits/basic_string.h:2590:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
In file included from /usr/include/c++/4.7/list:64:0,
                 from prog.cpp:2:
/usr/include/c++/4.7/bits/stl_list.h:1603:5: note: template<class _Tp, class _Alloc> bool std::operator<(const std::list<_Tp, _Alloc>&, const std::list<_Tp, _Alloc>&)
/usr/include/c++/4.7/bits/stl_list.h:1603:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::list<_Tp, _Alloc>'
In file included from /usr/include/c++/4.7/deque:65:0,
                 from /usr/include/c++/4.7/queue:61,
                 from prog.cpp:3:
/usr/include/c++/4.7/bits/stl_deque.h:274:5: note: template<class _Tp, class _Ref, class _Ptr> bool std::operator<(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)
/usr/include/c++/4.7/bits/stl_deque.h:274:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
In file included from /usr/include/c++/4.7/deque:65:0,
                 from /usr/include/c++/4.7/queue:61,
                 from prog.cpp:3:
/usr/include/c++/4.7/bits/stl_deque.h:282:5: note: template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> bool std::operator<(const std::_Deque_iterator<_Tp, _RefL, _PtrL>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)
/usr/include/c++/4.7/bits/stl_deque.h:282:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::_Deque_iterator<_Tp, _RefL, _PtrL>'
In file included from /usr/include/c++/4.7/deque:65:0,
                 from /usr/include/c++/4.7/queue:61,
                 from prog.cpp:3:
/usr/include/c++/4.7/bits/stl_deque.h:1947:5: note: template<class _Tp, class _Alloc> bool std::operator<(const std::deque<_Tp, _Alloc>&, const std::deque<_Tp, _Alloc>&)
/usr/include/c++/4.7/bits/stl_deque.h:1947:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::deque<_Tp, _Alloc>'
In file included from /usr/include/c++/4.7/vector:65:0,
                 from /usr/include/c++/4.7/queue:62,
                 from prog.cpp:3:
/usr/include/c++/4.7/bits/stl_vector.h:1387:5: note: template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
/usr/include/c++/4.7/bits/stl_vector.h:1387:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>'
In file included from /usr/include/c++/4.7/queue:65:0,
                 from prog.cpp:3:
/usr/include/c++/4.7/bits/stl_queue.h:285:5: note: template<class _Tp, class _Seq> bool std::operator<(const std::queue<_Tp, _Seq>&, const std::queue<_Tp, _Seq>&)
/usr/include/c++/4.7/bits/stl_queue.h:285:5: note:   template argument deduction/substitution failed:
prog.cpp:75:37: note:   'std::basic_ostream<char>' is not derived from 'const std::queue<_Tp, _Seq>'

Questions?

Sponsors Gold