Detalii evaluare #8798918

Rezumat problemă

Se dă un vector cu n elemente, numere naturale. Fie două numere x și y, cu proprietatea că 1 ≤ x, y ≤ n. Scrieți un program care răspunde la m întrebări de tipul “Care este elementul minim din intervalul [x, y]?”.

Detalii

Problema AfisMinime Operații I/O afisminime.in/afisminime.out
Limita timp 0.6 secunde Limita memorie Total: 9 MB / Stivă 3 MB
Id soluție #8798918 Utilizator Stafie Calin (Calin_Stafie)
Fișier afisminime.cpp Dimensiune 303 B
Data încărcării 13 Martie 2018, 09:36 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

afisminime.cpp: In function 'int main()':
afisminime.cpp:9:4: error: no match for 'operator>' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
 { f>n>>m;

    ^
afisminime.cpp:9:4: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:233:5: note: 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/include/c++/4.8/bits/stl_pair.h:233:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:309:5: note: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator>(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:309:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:359:5: note: 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/include/c++/4.8/bits/stl_iterator.h:359:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1079:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator>(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1079:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1085:5: note: template<class _Iterator> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator>(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1085:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2606: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>&)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2606:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2618:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2618:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2630:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator>(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2630:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   mismatched types 'const _CharT*' and 'std::basic_ifstream<char>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h:1434:5: note: 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/include/c++/4.8/bits/stl_vector.h:1434:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::vector<_Tp, _Alloc>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/array:246:5: note: template<class _Tp, unsigned int _Nm> bool std::operator>(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
     ^
/usr/include/c++/4.8/array:246:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::array<_Tp, _Nm>'
 { f>n>>m;

        ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/tuple:841:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator>(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:841:5: note:   template argument deduction/substitution failed:
afisminime.cpp:9:8: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::tuple<_Elements ...>'
 { f>n>>m;

        ^
afisminime.cpp:10:20: error: no match for 'operator>' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
 for(i=1;i<=n;i++) f>a[i];

                    ^
afisminime.cpp:10:20: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:233:5: note: 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/include/c++/4.8/bits/stl_pair.h:233:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:309:5: note: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator>(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:309:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:359:5: note: 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/include/c++/4.8/bits/stl_iterator.h:359:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1079:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator>(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1079:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1085:5: note: template<class _Iterator> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator>(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1085:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2606: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>&)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2606:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2618:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2618:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2630:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator>(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2630:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   mismatched types 'const _CharT*' and 'std::basic_ifstream<char>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h:1434:5: note: 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/include/c++/4.8/bits/stl_vector.h:1434:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::vector<_Tp, _Alloc>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/array:246:5: note: template<class _Tp, unsigned int _Nm> bool std::operator>(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
     ^
/usr/include/c++/4.8/array:246:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::array<_Tp, _Nm>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/tuple:841:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator>(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:841:5: note:   template argument deduction/substitution failed:
afisminime.cpp:10:24: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::tuple<_Elements ...>'
 for(i=1;i<=n;i++) f>a[i];

                        ^
afisminime.cpp:13:6: error: no match for 'operator>' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
     f>x>>y;

      ^
afisminime.cpp:13:6: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:233:5: note: 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/include/c++/4.8/bits/stl_pair.h:233:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:309:5: note: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator>(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:309:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:359:5: note: 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/include/c++/4.8/bits/stl_iterator.h:359:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1079:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator>(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1079:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1085:5: note: template<class _Iterator> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator>(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1085:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2606: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>&)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2606:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2618:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2618:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2630:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator>(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2630:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   mismatched types 'const _CharT*' and 'std::basic_ifstream<char>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h:1434:5: note: 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/include/c++/4.8/bits/stl_vector.h:1434:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::vector<_Tp, _Alloc>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/array:246:5: note: template<class _Tp, unsigned int _Nm> bool std::operator>(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
     ^
/usr/include/c++/4.8/array:246:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::array<_Tp, _Nm>'
     f>x>>y;

          ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/tuple:841:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator>(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:841:5: note:   template argument deduction/substitution failed:
afisminime.cpp:13:10: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::tuple<_Elements ...>'
     f>x>>y;

          ^
afisminime.cpp:14:6: error: no match for 'operator<' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
     g<*min_element(a+x,a+y+1)<<'\n';

      ^
afisminime.cpp:14:6: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note: 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/include/c++/4.8/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note: 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/include/c++/4.8/bits/stl_iterator.h:347:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note: template<class _Iterator> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2569: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>&)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from afisminime.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   mismatched types 'const _CharT*' and 'std::basic_ofstream<char>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h:1421:5: note: 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/include/c++/4.8/bits/stl_vector.h:1421:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::vector<_Tp, _Alloc>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/array:238:5: note: template<class _Tp, unsigned int _Nm> bool std::operator<(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
     ^
/usr/include/c++/4.8/array:238:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::array<_Tp, _Nm>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from afisminime.cpp:2:
/usr/include/c++/4.8/tuple:824:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator<(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:824:5: note:   template argument deduction/substitution failed:
afisminime.cpp:14:32: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::tuple<_Elements ...>'
     g<*min_element(a+x,a+y+1)<<'\n';

                                ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema AfisMinime face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.