Detalii evaluare #30233541

Rezumat problemă

#2834 Sir13

Se dă un șir de cel mult un milion de numere naturale din intervalul [0,109], separate prin câte un spațiu. Șirul are cel puțin doi termeni pari și cel puțin doi termeni impari.

Se cere să se afișeze mesajul DA dacă șirul aflat în fișier are un subșir ordonat crescător, format din toți termenii pari ai săi, și un subșir ordonat descrescător, format din toți termenii impari ai săi. Dacă nu există două astfel de subșiruri, programul afișează pe ecran mesajul NU.

Detalii

Problema Sir13 Operații I/O sir13.in/sir13.out
Limita timp 0.3 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #30233541 Utilizator Ionita Iulian Nicolae (IulianMathematics)
Fișier sir13.cpp Dimensiune 513 B
Data încărcării 29 Iunie 2021, 18:13 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

sir13.cpp:8:50: error: conflicting declaration 'int f'
 int x,maxi=1000000001,start=1,stop,i,n,a,b,c,d,e,f,g;

                                                  ^
sir13.cpp:5:10: error: 'f' has a previous declaration as 'std::ifstream f'
 ifstream f("sir13.in");

          ^
sir13.cpp:8:52: error: conflicting declaration 'int g'
 int x,maxi=1000000001,start=1,stop,i,n,a,b,c,d,e,f,g;

                                                    ^
sir13.cpp:6:10: error: 'g' has a previous declaration as 'std::ofstream g'
 ofstream g("sir13.out");

          ^
sir13.cpp: In function 'int main()':
sir13.cpp:13:10: warning: statement has no effect [-Wunused-value]
 for(start;start<x;start++){

          ^
sir13.cpp:19:18: error: cannot bind 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&'
     f>>a>>b>>c>>d>>e>>f>>g;

                  ^
In file included from /usr/include/c++/4.8/fstream:38:0,
                 from sir13.cpp:1:
/usr/include/c++/4.8/istream:872:5: error:   initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::basic_ifstream<char>]'
     operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
     ^
sir13.cpp:20:45: error: no match for 'operator==' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                             ^
sir13.cpp:20:45: note: candidates are:
In file included from /usr/include/c++/4.8/iosfwd:40:0,
                 from /usr/include/c++/4.8/ios:38,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/postypes.h:216:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
     operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^
/usr/include/c++/4.8/bits/postypes.h:216:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::fpos<_StateT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:214: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:214:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:291: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:291:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:341: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:341:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1031: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:1031:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1037: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:1037:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
     operator==(const allocator<_T1>&, const allocator<_T2>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:128:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::allocator<_CharT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:133:5: note: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
     operator==(const allocator<_Tp>&, const allocator<_Tp>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:133:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::allocator<_CharT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2486: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:2486:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&)
     operator==(const basic_string<_CharT>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2507: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:2507:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   mismatched types 'const _CharT*' and 'std::basic_ifstream<char>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2519: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:2519:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0,
                 from /usr/include/c++/4.8/bits/basic_ios.h:37,
                 from /usr/include/c++/4.8/ios:44,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: 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/include/c++/4.8/bits/streambuf_iterator.h:204:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:47: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                               ^
sir13.cpp:20:53: error: no match for 'operator==' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                     ^
sir13.cpp:20:53: note: candidates are:
In file included from /usr/include/c++/4.8/iosfwd:40:0,
                 from /usr/include/c++/4.8/ios:38,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/postypes.h:216:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
     operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^
/usr/include/c++/4.8/bits/postypes.h:216:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::fpos<_StateT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:214: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:214:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:291: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:291:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:341: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:341:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1031: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:1031:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1037: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:1037:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
     operator==(const allocator<_T1>&, const allocator<_T2>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:128:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::allocator<_CharT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:133:5: note: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
     operator==(const allocator<_Tp>&, const allocator<_Tp>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:133:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::allocator<_CharT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2486: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:2486:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&)
     operator==(const basic_string<_CharT>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2507: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:2507:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   mismatched types 'const _CharT*' and 'std::basic_ofstream<char>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2519: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:2519:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0,
                 from /usr/include/c++/4.8/bits/basic_ios.h:37,
                 from /usr/include/c++/4.8/ios:44,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: 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/include/c++/4.8/bits/streambuf_iterator.h:204:5: note:   template argument deduction/substitution failed:
sir13.cpp:20:55: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
 if(a==7 && b==2 && c==5 && d==2 && e==4 && f==3 && g==8)

                                                       ^
sir13.cpp:21:6: error: no match for 'operator>>' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'const char [3]')
     g>>"DA";

      ^
sir13.cpp:21:6: note: candidates are:
In file included from /usr/include/c++/4.8/string:53: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.tcc:996:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::basic_string<_CharT, _Traits, _Alloc>&)
     operator>>(basic_istream<_CharT, _Traits>& __in,
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:996:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
     g>>"DA";

        ^
In file included from /usr/include/c++/4.8/istream:882:0,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/istream.tcc:955:5: note: template<class _CharT2, class _Traits2> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT2*)
     operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
     ^
/usr/include/c++/4.8/bits/istream.tcc:955:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
     g>>"DA";

        ^
In file included from /usr/include/c++/4.8/istream:882:0,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/istream.tcc:923:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)
     operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
     ^
/usr/include/c++/4.8/bits/istream.tcc:923:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
     g>>"DA";

        ^
In file included from /usr/include/c++/4.8/fstream:38:0,
                 from sir13.cpp:1:
/usr/include/c++/4.8/istream:727:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)
     operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
     ^
/usr/include/c++/4.8/istream:727:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<char, _Traits>'
     g>>"DA";

        ^
In file included from /usr/include/c++/4.8/fstream:38:0,
                 from sir13.cpp:1:
/usr/include/c++/4.8/istream:732:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&)
     operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
     ^
/usr/include/c++/4.8/istream:732:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<char, _Traits>'
     g>>"DA";

        ^
In file included from /usr/include/c++/4.8/fstream:38:0,
                 from sir13.cpp:1:
/usr/include/c++/4.8/istream:774:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*)
     operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
     ^
/usr/include/c++/4.8/istream:774:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<char, _Traits>'
     g>>"DA";

        ^
In file included from /usr/include/c++/4.8/fstream:38:0,
                 from sir13.cpp:1:
/usr/include/c++/4.8/istream:779:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*)
     operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
     ^
/usr/include/c++/4.8/istream:779:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<char, _Traits>'
     g>>"DA";

        ^
In file included from /usr/include/c++/4.8/fstream:38:0,
                 from sir13.cpp:1:
/usr/include/c++/4.8/istream:872:5: note: template<class _CharT, class _Traits, class _Tp> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&)
     operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
     ^
/usr/include/c++/4.8/istream:872:5: note:   template argument deduction/substitution failed:
sir13.cpp:21:8: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
     g>>"DA";

        ^
sir13.cpp:22:50: error: no match for 'operator==' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                  ^
sir13.cpp:22:50: note: candidates are:
In file included from /usr/include/c++/4.8/iosfwd:40:0,
                 from /usr/include/c++/4.8/ios:38,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/postypes.h:216:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
     operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^
/usr/include/c++/4.8/bits/postypes.h:216:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::fpos<_StateT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:214: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:214:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:291: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:291:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:341: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:341:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1031: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:1031:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1037: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:1037:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
     operator==(const allocator<_T1>&, const allocator<_T2>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:128:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::allocator<_CharT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:133:5: note: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
     operator==(const allocator<_Tp>&, const allocator<_Tp>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:133:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::allocator<_CharT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2486: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:2486:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&)
     operator==(const basic_string<_CharT>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2507: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:2507:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   mismatched types 'const _CharT*' and 'std::basic_ifstream<char>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2519: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:2519:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0,
                 from /usr/include/c++/4.8/bits/basic_ios.h:37,
                 from /usr/include/c++/4.8/ios:44,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: 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/include/c++/4.8/bits/streambuf_iterator.h:204:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:52: note:   'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                    ^
sir13.cpp:22:58: error: no match for 'operator==' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                          ^
sir13.cpp:22:58: note: candidates are:
In file included from /usr/include/c++/4.8/iosfwd:40:0,
                 from /usr/include/c++/4.8/ios:38,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/postypes.h:216:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
     operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^
/usr/include/c++/4.8/bits/postypes.h:216:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::fpos<_StateT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:214: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:214:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::pair<_T1, _T2>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:291: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:291:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:341: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:341:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1031: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:1031:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1037: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:1037:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::move_iterator<_Iterator>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
     operator==(const allocator<_T1>&, const allocator<_T2>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:128:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::allocator<_CharT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
In file included from /usr/include/c++/4.8/string:41: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 sir13.cpp:1:
/usr/include/c++/4.8/bits/allocator.h:133:5: note: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
     operator==(const allocator<_Tp>&, const allocator<_Tp>&)
     ^
/usr/include/c++/4.8/bits/allocator.h:133:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::allocator<_CharT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2486: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:2486:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&)
     operator==(const basic_string<_CharT>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2493:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2507: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:2507:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   mismatched types 'const _CharT*' and 'std::basic_ofstream<char>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
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 sir13.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2519: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:2519:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0,
                 from /usr/include/c++/4.8/bits/basic_ios.h:37,
                 from /usr/include/c++/4.8/ios:44,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from sir13.cpp:1:
/usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: 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/include/c++/4.8/bits/streambuf_iterator.h:204:5: note:   template argument deduction/substitution failed:
sir13.cpp:22:60: note:   'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
 else if(a==5 && b==2 && c==7 && d==2 && e==3 && f==4 && g==8)

                                                            ^
sir13.cpp:29:5: error: expected ';' before 'return'
     return 0;

     ^

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 Sir13 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ă.