Detalii evaluare #55093742

Rezumat problemă

Se citește un număr natural n. Acest număr se “împarte” în alte două numere x și y, astfel: x este format din cifrele din prima jumătate a lui n, y este format din cifrele din a doua jumătate a lui n. Dacă n are număr impar de cifre, cifra din mijloc va fi prima cifră a lui y. De exemplu, dacă n=88132, atunci x=88, iar y=132.

Să se determine cel mai mare divizor comun al lui x și y.

Olimpiada locală de Informatică, Prahova, 2016

Detalii

Problema Jumatate1 Operații I/O jumatate1.in/jumatate1.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #55093742 Utilizator Marin Andrei (Andreinueutilizat)
Fișier jumatate1.cpp Dimensiune 1.17 KB
Data încărcării 22 Decembrie 2024, 16:15 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

jumatate1.cpp:28:1: error: stray '\304' in program
 Nu uita să acorzi o notă soluției!

 ^
jumatate1.cpp:28:1: error: stray '\203' in program
jumatate1.cpp:28:1: error: stray '\304' in program
jumatate1.cpp:28:1: error: stray '\203' in program
jumatate1.cpp:28:1: error: stray '\310' in program
jumatate1.cpp:28:1: error: stray '\233' in program
jumatate1.cpp:39:1: error: stray '\342' in program
 5/5•1 voturi

 ^
jumatate1.cpp:39:1: error: stray '\200' in program
jumatate1.cpp:39:1: error: stray '\242' in program
jumatate1.cpp:28:1: error: 'Nu' does not name a type
 Nu uita să acorzi o notă soluției!

 ^
In file included from /usr/include/c++/4.8/iosfwd:39: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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/stringfwd.h:56:30: error: expected type-specifier before 'allocator'
            typename _Alloc = allocator<_CharT> >
                              ^
/usr/include/c++/4.8/bits/stringfwd.h:56:30: error: expected '>' before 'allocator'
/usr/include/c++/4.8/bits/stringfwd.h:62:28: error: template argument 3 is invalid
   typedef basic_string<char>    string;   
                            ^
/usr/include/c++/4.8/bits/stringfwd.h:62:39: error: invalid type in declaration before ';' token
   typedef basic_string<char>    string;   
                                       ^
/usr/include/c++/4.8/bits/stringfwd.h:68:31: error: template argument 3 is invalid
   typedef basic_string<wchar_t> wstring;   
                               ^
/usr/include/c++/4.8/bits/stringfwd.h:68:40: error: invalid type in declaration before ';' token
   typedef basic_string<wchar_t> wstring;   
                                        ^
/usr/include/c++/4.8/bits/stringfwd.h:78:32: error: template argument 3 is invalid
   typedef basic_string<char16_t> u16string; 
                                ^
/usr/include/c++/4.8/bits/stringfwd.h:78:43: error: invalid type in declaration before ';' token
   typedef basic_string<char16_t> u16string; 
                                           ^
/usr/include/c++/4.8/bits/stringfwd.h:81:32: error: template argument 3 is invalid
   typedef basic_string<char32_t> u32string; 
                                ^
/usr/include/c++/4.8/bits/stringfwd.h:81:43: error: invalid type in declaration before ';' token
   typedef basic_string<char32_t> u32string; 
                                           ^
In file included from /usr/include/c++/4.8/ios:38:0,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from jumatate1.cpp:43:
/usr/include/c++/4.8/iosfwd:92:24: error: expected type-specifier before 'allocator'
      typename _Alloc = allocator<_CharT> >
                        ^
/usr/include/c++/4.8/iosfwd:92:24: error: expected '>' before 'allocator'
/usr/include/c++/4.8/iosfwd:96:23: error: expected type-specifier before 'allocator'
     typename _Alloc = allocator<_CharT> >
                       ^
/usr/include/c++/4.8/iosfwd:96:23: error: expected '>' before 'allocator'
/usr/include/c++/4.8/iosfwd:100:23: error: expected type-specifier before 'allocator'
     typename _Alloc = allocator<_CharT> >
                       ^
/usr/include/c++/4.8/iosfwd:100:23: error: expected '>' before 'allocator'
/usr/include/c++/4.8/iosfwd:104:23: error: expected type-specifier before 'allocator'
     typename _Alloc = allocator<_CharT> >
                       ^
/usr/include/c++/4.8/iosfwd:104:23: error: expected '>' before 'allocator'
/usr/include/c++/4.8/iosfwd:142:31: error: template argument 3 is invalid
   typedef basic_stringbuf<char>  stringbuf;
                               ^
/usr/include/c++/4.8/iosfwd:142:43: error: invalid type in declaration before ';' token
   typedef basic_stringbuf<char>  stringbuf;
                                           ^
/usr/include/c++/4.8/iosfwd:145:35: error: template argument 3 is invalid
   typedef basic_istringstream<char>  istringstream;
                                   ^
/usr/include/c++/4.8/iosfwd:145:51: error: invalid type in declaration before ';' token
   typedef basic_istringstream<char>  istringstream;
                                                   ^
/usr/include/c++/4.8/iosfwd:148:35: error: template argument 3 is invalid
   typedef basic_ostringstream<char>  ostringstream;
                                   ^
/usr/include/c++/4.8/iosfwd:148:51: error: invalid type in declaration before ';' token
   typedef basic_ostringstream<char>  ostringstream;
                                                   ^
/usr/include/c++/4.8/iosfwd:151:34: error: template argument 3 is invalid
   typedef basic_stringstream<char>  stringstream;
                                  ^
/usr/include/c++/4.8/iosfwd:151:49: error: invalid type in declaration before ';' token
   typedef basic_stringstream<char>  stringstream;
                                                 ^
/usr/include/c++/4.8/iosfwd:182:34: error: template argument 3 is invalid
   typedef basic_stringbuf<wchar_t>  wstringbuf;
                                  ^
/usr/include/c++/4.8/iosfwd:182:47: error: invalid type in declaration before ';' token
   typedef basic_stringbuf<wchar_t>  wstringbuf;
                                               ^
/usr/include/c++/4.8/iosfwd:185:38: error: template argument 3 is invalid
   typedef basic_istringstream<wchar_t>  wistringstream;
                                      ^
/usr/include/c++/4.8/iosfwd:185:55: error: invalid type in declaration before ';' token
   typedef basic_istringstream<wchar_t>  wistringstream;
                                                       ^
/usr/include/c++/4.8/iosfwd:188:38: error: template argument 3 is invalid
   typedef basic_ostringstream<wchar_t>  wostringstream;
                                      ^
/usr/include/c++/4.8/iosfwd:188:55: error: invalid type in declaration before ';' token
   typedef basic_ostringstream<wchar_t>  wostringstream;
                                                       ^
/usr/include/c++/4.8/iosfwd:191:37: error: template argument 3 is invalid
   typedef basic_stringstream<wchar_t>  wstringstream;
                                     ^
/usr/include/c++/4.8/iosfwd:191:53: error: invalid type in declaration before ';' token
   typedef basic_stringstream<wchar_t>  wstringstream;
                                                     ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/allocator.h:63:11: error: 'allocator' is not a class template
     class allocator<void>
           ^
/usr/include/c++/4.8/bits/allocator.h:64:5: error: explicit specialization of non-template 'std::allocator'
     {
     ^
/usr/include/c++/4.8/bits/allocator.h:74:19: error: 'std::allocator' is not a template
         { typedef allocator<_Tp1> other; };
                   ^
/usr/include/c++/4.8/bits/allocator.h:92:11: error: 'std::allocator' is not a template type
     class allocator: public __allocator_base<_Tp>
           ^
/usr/include/c++/4.8/bits/allocator.h:128:22: error: 'std::allocator' is not a template
     operator==(const allocator<_T1>&, const allocator<_T2>&)
                      ^
/usr/include/c++/4.8/bits/allocator.h:128:45: error: 'std::allocator' is not a template
     operator==(const allocator<_T1>&, const allocator<_T2>&)
                                             ^
/usr/include/c++/4.8/bits/allocator.h:133:22: error: 'std::allocator' is not a template
     operator==(const allocator<_Tp>&, const allocator<_Tp>&)
                      ^
/usr/include/c++/4.8/bits/allocator.h:133:45: error: 'std::allocator' is not a template
     operator==(const allocator<_Tp>&, const allocator<_Tp>&)
                                             ^
/usr/include/c++/4.8/bits/allocator.h:138:22: error: 'std::allocator' is not a template
     operator!=(const allocator<_T1>&, const allocator<_T2>&)
                      ^
/usr/include/c++/4.8/bits/allocator.h:138:45: error: 'std::allocator' is not a template
     operator!=(const allocator<_T1>&, const allocator<_T2>&)
                                             ^
/usr/include/c++/4.8/bits/allocator.h:143:22: error: 'std::allocator' is not a template
     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
                      ^
/usr/include/c++/4.8/bits/allocator.h:143:45: error: 'std::allocator' is not a template
     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
                                             ^
/usr/include/c++/4.8/bits/allocator.h:151:25: error: 'allocator' is not a class template
   extern template class allocator<char>;
                         ^
/usr/include/c++/4.8/bits/allocator.h:151:25: error: explicit instantiation of non-template type 'std::allocator'
/usr/include/c++/4.8/bits/allocator.h:152:25: error: 'allocator' is not a class template
   extern template class allocator<wchar_t>;
                         ^
/usr/include/c++/4.8/bits/allocator.h:152:25: error: explicit instantiation of non-template type 'std::allocator'
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.h:2493:41: error: template argument 3 is invalid
     operator==(const basic_string<_CharT>& __lhs,
                                         ^
/usr/include/c++/4.8/bits/basic_string.h:2494:34: error: template argument 3 is invalid
         const basic_string<_CharT>& __rhs)
                                  ^
/usr/include/c++/4.8/bits/basic_string.h:2494:42: error: 'typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const int&, const int&)' must have an argument of class or enumerated type
         const basic_string<_CharT>& __rhs)
                                          ^
/usr/include/c++/4.8/bits/basic_string.h:2740:60: error: template argument 3 is invalid
     operator>>(basic_istream<char>& __is, basic_string<char>& __str);
                                                            ^
/usr/include/c++/4.8/bits/basic_string.h:2740:5: error: template-id 'operator>><>' for 'std::basic_istream<char>& std::operator>>(std::basic_istream<char>&, int&)' does not match any template declaration
     operator>>(basic_istream<char>& __is, basic_string<char>& __str);
     ^
/usr/include/c++/4.8/bits/basic_string.h:2799:57: error: template argument 3 is invalid
     getline(basic_istream<char>& __in, basic_string<char>& __str,
                                                         ^
/usr/include/c++/4.8/bits/basic_string.h:2799:5: error: template-id 'getline<>' for 'std::basic_istream<char>& std::getline(std::basic_istream<char>&, int&, char)' does not match any template declaration
     getline(basic_istream<char>& __in, basic_string<char>& __str,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2805:63: error: template argument 3 is invalid
     getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,
                                                               ^
/usr/include/c++/4.8/bits/basic_string.h:2805:5: error: template-id 'getline<>' for 'std::basic_istream<wchar_t>& std::getline(std::basic_istream<wchar_t>&, int&, wchar_t)' does not match any template declaration
     getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,
     ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.h: In function 'int std::stoi(const string&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2824:69: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
                                                                     ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long int std::stol(const string&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2829:58: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),
                                                          ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long unsigned int std::stoul(const string&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2834:60: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(),
                                                            ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long long int std::stoll(const string&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2839:60: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
                                                            ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long long unsigned int std::stoull(const string&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2844:62: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
                                                              ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'float std::stof(const string&, std::size_t*)':
/usr/include/c++/4.8/bits/basic_string.h:2850:58: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
                                                          ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'double std::stod(const string&, std::size_t*)':
/usr/include/c++/4.8/bits/basic_string.h:2854:58: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
                                                          ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long double std::stold(const string&, std::size_t*)':
/usr/include/c++/4.8/bits/basic_string.h:2858:60: error: request for member 'c_str' in '__str', which is of non-class type 'const string {aka const int}'
   { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
                                                            ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'int std::stoi(const wstring&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2926:3: error: redefinition of 'int std::stoi(const wstring&, std::size_t*, int)'
   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2823:3: error: 'int std::stoi(const string&, std::size_t*, int)' previously defined here
   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2927:69: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
                                                                     ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long int std::stol(const wstring&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2931:3: error: redefinition of 'long int std::stol(const wstring&, std::size_t*, int)'
   stol(const wstring& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2828:3: error: 'long int std::stol(const string&, std::size_t*, int)' previously defined here
   stol(const string& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2932:58: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(),
                                                          ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long unsigned int std::stoul(const wstring&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2936:3: error: redefinition of 'long unsigned int std::stoul(const wstring&, std::size_t*, int)'
   stoul(const wstring& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2833:3: error: 'long unsigned int std::stoul(const string&, std::size_t*, int)' previously defined here
   stoul(const string& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2937:60: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(),
                                                            ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long long int std::stoll(const wstring&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2941:3: error: redefinition of 'long long int std::stoll(const wstring&, std::size_t*, int)'
   stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2838:3: error: 'long long int std::stoll(const string&, std::size_t*, int)' previously defined here
   stoll(const string& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2942:60: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
                                                            ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long long unsigned int std::stoull(const wstring&, std::size_t*, int)':
/usr/include/c++/4.8/bits/basic_string.h:2946:3: error: redefinition of 'long long unsigned int std::stoull(const wstring&, std::size_t*, int)'
   stoull(const wstring& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2843:3: error: 'long long unsigned int std::stoull(const string&, std::size_t*, int)' previously defined here
   stoull(const string& __str, size_t* __idx = 0, int __base = 10)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2947:62: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),
                                                              ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'float std::stof(const wstring&, std::size_t*)':
/usr/include/c++/4.8/bits/basic_string.h:2952:3: error: redefinition of 'float std::stof(const wstring&, std::size_t*)'
   stof(const wstring& __str, size_t* __idx = 0)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2849:3: error: 'float std::stof(const string&, std::size_t*)' previously defined here
   stof(const string& __str, size_t* __idx = 0)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2953:58: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
                                                          ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'double std::stod(const wstring&, std::size_t*)':
/usr/include/c++/4.8/bits/basic_string.h:2956:3: error: redefinition of 'double std::stod(const wstring&, std::size_t*)'
   stod(const wstring& __str, size_t* __idx = 0)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2853:3: error: 'double std::stod(const string&, std::size_t*)' previously defined here
   stod(const string& __str, size_t* __idx = 0)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2957:58: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); }
                                                          ^
/usr/include/c++/4.8/bits/basic_string.h: In function 'long double std::stold(const wstring&, std::size_t*)':
/usr/include/c++/4.8/bits/basic_string.h:2960:3: error: redefinition of 'long double std::stold(const wstring&, std::size_t*)'
   stold(const wstring& __str, size_t* __idx = 0)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2857:3: error: 'long double std::stold(const string&, std::size_t*)' previously defined here
   stold(const string& __str, size_t* __idx = 0)
   ^
/usr/include/c++/4.8/bits/basic_string.h:2961:60: error: request for member 'c_str' in '__str', which is of non-class type 'const wstring {aka const int}'
   { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
                                                            ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.h: At global scope:
/usr/include/c++/4.8/bits/basic_string.h:3044:12: error: redefinition of 'struct std::hash<int>'
     struct hash<string>
            ^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8/string:52,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/functional_hash.h:104:3: error: previous definition of 'struct std::hash<int>'
   _Cxx_hashtable_define_trivial_hash(int)
   ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.h:3059:12: error: redefinition of 'struct std::hash<int>'
     struct hash<wstring>
            ^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8/string:52,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/functional_hash.h:104:3: error: previous definition of 'struct std::hash<int>'
   _Cxx_hashtable_define_trivial_hash(int)
   ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.h:3069:12: error: redefinition of 'struct std::__is_fast_hash<std::hash<int> >'
     struct __is_fast_hash<hash<wstring>> : std::false_type
            ^
/usr/include/c++/4.8/bits/basic_string.h:3053:12: error: previous definition of 'struct std::__is_fast_hash<std::hash<int> >'
     struct __is_fast_hash<hash<string>> : std::false_type
            ^
/usr/include/c++/4.8/bits/basic_string.h:3077:12: error: redefinition of 'struct std::hash<int>'
     struct hash<u16string>
            ^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8/string:52,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/functional_hash.h:104:3: error: previous definition of 'struct std::hash<int>'
   _Cxx_hashtable_define_trivial_hash(int)
   ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.h:3087:12: error: redefinition of 'struct std::__is_fast_hash<std::hash<int> >'
     struct __is_fast_hash<hash<u16string>> : std::false_type
            ^
/usr/include/c++/4.8/bits/basic_string.h:3053:12: error: previous definition of 'struct std::__is_fast_hash<std::hash<int> >'
     struct __is_fast_hash<hash<string>> : std::false_type
            ^
/usr/include/c++/4.8/bits/basic_string.h:3092:12: error: redefinition of 'struct std::hash<int>'
     struct hash<u32string>
            ^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8/string:52,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/functional_hash.h:104:3: error: previous definition of 'struct std::hash<int>'
   _Cxx_hashtable_define_trivial_hash(int)
   ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.h:3102:12: error: redefinition of 'struct std::__is_fast_hash<std::hash<int> >'
     struct __is_fast_hash<hash<u32string>> : std::false_type
            ^
/usr/include/c++/4.8/bits/basic_string.h:3053:12: error: previous definition of 'struct std::__is_fast_hash<std::hash<int> >'
     struct __is_fast_hash<hash<string>> : std::false_type
            ^
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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/basic_string.tcc:1132:42: error: template argument 3 is invalid
   extern template class basic_string<char>;
                                          ^
/usr/include/c++/4.8/bits/basic_string.tcc:1135:5: error: template-id 'operator>><>' for 'std::basic_istream<char>& std::operator>>(std::basic_istream<char>&, std::string&)' does not match any template declaration
     operator>>(basic_istream<char>&, string&);
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:1138:5: error: template-id 'operator<< <>' for 'std::basic_ostream<char>& std::operator<<(std::basic_ostream<char>&, const string&)' does not match any template declaration
     operator<<(basic_ostream<char>&, const string&);
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:1141:5: error: template-id 'getline<>' for 'std::basic_istream<char>& std::getline(std::basic_istream<char>&, std::string&, char)' does not match any template declaration
     getline(basic_istream<char>&, string&, char);
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:1144:5: error: template-id 'getline<>' for 'std::basic_istream<char>& std::getline(std::basic_istream<char>&, std::string&)' does not match any template declaration
     getline(basic_istream<char>&, string&);
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:1147:45: error: template argument 3 is invalid
   extern template class basic_string<wchar_t>;
                                             ^
/usr/include/c++/4.8/bits/basic_string.tcc:1150:5: error: template-id 'operator>><>' for 'std::basic_istream<wchar_t>& std::operator>>(std::basic_istream<wchar_t>&, std::wstring&)' does not match any template declaration
     operator>>(basic_istream<wchar_t>&, wstring&);
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:1153:5: error: template-id 'operator<< <>' for 'std::basic_ostream<wchar_t>& std::operator<<(std::basic_ostream<wchar_t>&, const wstring&)' does not match any template declaration
     operator<<(basic_ostream<wchar_t>&, const wstring&);
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:1156:5: error: template-id 'getline<>' for 'std::basic_istream<wchar_t>& std::getline(std::basic_istream<wchar_t>&, std::wstring&, wchar_t)' does not match any template declaration
     getline(basic_istream<wchar_t>&, wstring&, wchar_t);
     ^
/usr/include/c++/4.8/bits/basic_string.tcc:1159:5: error: template-id 'getline<>' for 'std::basic_istream<wchar_t>& std::getline(std::basic_istream<wchar_t>&, std::wstring&)' does not match any template declaration
     getline(basic_istream<wchar_t>&, wstring&);
     ^
In file included from /usr/include/c++/4.8/bits/ios_base.h:41:0,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/locale_classes.h:591:34: error: template argument 3 is invalid
       typedef basic_string<_CharT> string_type;
                                  ^
/usr/include/c++/4.8/bits/locale_classes.h:764:34: error: template argument 3 is invalid
       typedef basic_string<_CharT> string_type;
                                  ^
In file included from /usr/include/c++/4.8/bits/locale_classes.h:787:0,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/locale_classes.tcc: In member function 'virtual int std::collate<_CharT>::do_compare(const _CharT*, const _CharT*, const _CharT*, const _CharT*) const':
/usr/include/c++/4.8/bits/locale_classes.tcc:166:43: error: expression list treated as compound expression in initializer [-fpermissive]
       const string_type __one(__lo1, __hi1);
                                           ^
/usr/include/c++/4.8/bits/locale_classes.tcc:167:43: error: expression list treated as compound expression in initializer [-fpermissive]
       const string_type __two(__lo2, __hi2);
                                           ^
/usr/include/c++/4.8/bits/locale_classes.tcc:169:33: error: request for member 'c_str' in '__one', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __p = __one.c_str();
                                 ^
/usr/include/c++/4.8/bits/locale_classes.tcc:170:36: error: request for member 'data' in '__one', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __pend = __one.data() + __one.length();
                                    ^
/usr/include/c++/4.8/bits/locale_classes.tcc:170:51: error: request for member 'length' in '__one', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __pend = __one.data() + __one.length();
                                                   ^
/usr/include/c++/4.8/bits/locale_classes.tcc:171:33: error: request for member 'c_str' in '__two', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __q = __two.c_str();
                                 ^
/usr/include/c++/4.8/bits/locale_classes.tcc:172:36: error: request for member 'data' in '__two', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __qend = __two.data() + __two.length();
                                    ^
/usr/include/c++/4.8/bits/locale_classes.tcc:172:51: error: request for member 'length' in '__two', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __qend = __two.data() + __two.length();
                                                   ^
/usr/include/c++/4.8/bits/locale_classes.tcc: In member function 'virtual std::collate<_CharT>::string_type std::collate<_CharT>::do_transform(const _CharT*, const _CharT*) const':
/usr/include/c++/4.8/bits/locale_classes.tcc:205:41: error: expression list treated as compound expression in initializer [-fpermissive]
       const string_type __str(__lo, __hi);
                                         ^
/usr/include/c++/4.8/bits/locale_classes.tcc:207:33: error: request for member 'c_str' in '__str', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __p = __str.c_str();
                                 ^
/usr/include/c++/4.8/bits/locale_classes.tcc:208:36: error: request for member 'data' in '__str', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __pend = __str.data() + __str.length();
                                    ^
/usr/include/c++/4.8/bits/locale_classes.tcc:208:51: error: request for member 'length' in '__str', which is of non-class type 'const string_type {aka const int}'
       const _CharT* __pend = __str.data() + __str.length();
                                                   ^
/usr/include/c++/4.8/bits/locale_classes.tcc:233:14: error: request for member 'append' in '__ret', which is of non-class type 'std::collate<_CharT>::string_type {aka int}'
        __ret.append(__c, __res);
              ^
/usr/include/c++/4.8/bits/locale_classes.tcc:239:14: error: request for member 'push_back' in '__ret', which is of non-class type 'std::collate<_CharT>::string_type {aka int}'
        __ret.push_back(_CharT());
              ^
In file included from /usr/include/c++/4.8/bits/basic_ios.h:37:0,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/locale_facets.h: At global scope:
/usr/include/c++/4.8/bits/locale_facets.h:1648:34: error: template argument 3 is invalid
       typedef basic_string<_CharT> string_type;
                                  ^
/usr/include/c++/4.8/bits/locale_facets.h:1878:34: error: template argument 3 is invalid
       typedef basic_string<_CharT> string_type;
                                  ^
In file included from /usr/include/c++/4.8/bits/locale_facets.h:2608: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 jumatate1.cpp:43:
/usr/include/c++/4.8/bits/locale_facets.tcc: In member function '_InIter std::num_get<_CharT, _InIter>::_M_extract_float(_InIter, _InIter, std::ios_base&, std::ios_base::iostate&, std::string&) const':
/usr/include/c++/4.8/bits/locale_facets.tcc:207:19: error: request for member 'reserve' in '__found_grouping', which is of non-class type 'std::string {aka int}'
  __found_grouping.reserve(32);
                   ^
/usr/include/c++/4.8/bits/locale_facets.tcc:278:11: error: request for member 'clear' in '__xtrc', which is of non-class type 'std::string {aka int}'
    __xtrc.clear();
           ^
/usr/include/c++/4.8/bits/locale_facets.tcc:292:28: error: request for member 'size' in '__found_grouping', which is of non-class type 'std::string {aka int}'
       if (__found_grouping.size())
                            ^
/usr/include/c++/4.8/bits/locale_facets.tcc:315:28: error: request for member 'size' in '__found_grouping', which is of non-class type 'std::string {aka int}'
       if (__found_grouping.size() && !__found_dec)
                            ^
/usr/include/c++/4.8/bits/locale_facets.tcc:351:28: error: request for member 'size' in '__found_grouping', which is of non-class type 'std::string {aka int}'
       if (__found_grouping.size())
                            ^
/usr/include/c++/4.8/bits/locale_facets.tcc: In member function '_InIter std::num_get<_CharT, _InIter>::_M_extract_int(_InIter, _InIter, std::ios_base&, std::ios_base::iostate&, _ValueT&) const':
/usr/include/c++/4.8/bits/locale_facets.tcc:463:21: error: request for member 'reserve' in '__found_grouping', which is of non-class type 'std::string {aka int}'
    __found_grouping.reserve(32);
                     ^
/usr/include/c++/4.8/bits/locale_facets.tcc:549:23: error: request for member 'size' in '__found_grouping', which is of non-class type 'std::string {aka int}'
  if (__found_grouping.size())
                       ^
/usr/include/c++/4.8/bits/locale_facets.tcc:562:56: error: request for member 'size' in '__found_grouping', which is of non-class type 'std::string {aka int}'
  if ((!__sep_pos && !__found_zero && !__found_grouping.size())
                                                        ^
/usr/include/c++/4.8/bits/locale_facets.tcc: In member function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(std::num_get<_CharT, _InIter>::iter_type, std::num_get<_CharT, _InIter>::iter_type, std::ios_base&, std::ios_base::iostate&, float&) const':
/usr/include/c++/4.8/bits/locale_facets.tcc:690:14: error: request for member 'reserve' in '__xtrc', which is of non-class type 'std::string {aka int}'
       __xtrc.reserve(32);
              ^
/usr/include/c++/4.8/bits/locale_facets.tcc:692:34: error: request for member 'c_str' in '__xtrc', which is of non-class type 'std::string {aka int}'
       std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
                                  ^
/usr/include/c++/4.8/bits/locale_facets.tcc: In member function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(std::num_get<_CharT, _InIter>::iter_type, std::num_get<_CharT, _InIter>::iter_type, std::ios_base&, std::ios_base::iostate&, double&) const':
/usr/include/c++/4.8/bits/locale_facets.tcc:705:14: error: request for member 'reserve' in '__xtrc', which is of non-class type 'std::string {aka int}'
       __xtrc.reserve(32);
              ^
/usr/include/c++/4.8/bits/locale_facets.tcc:707:34: error: request for member 'c_str' in '__xtrc', which is of non-class type 'std::string {aka int}'
       std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
                                  ^
/usr/include/c++/4.8/bits/locale_facets.tcc: In member function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(std::num_get<_CharT, _InIter>::iter_type, std::num_get<_CharT, _InIter>::iter_type, std::ios_base&, std::ios_base::iostate&, long double&) const':
/usr/include/c++/4.8/bits/locale_facets.tcc:737:14: error: request for member 'reserve' in '__xtrc', which is of non-class type 'std::string {aka int}'
       __xtrc.reserve(32);
              ^
/usr/include/c++/4.8/bits/locale_facets.tcc:739:34: error: request for member 'c_str' in '__xtrc', which is of non-class type 'std::string {aka int}'
       std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
                                  ^
In file included from jumatate1.cpp:43:0:
/usr/include/c++/4.8/fstream: In member function 'std::basic_filebuf<_CharT, _Traits>::__filebuf_type* std::basic_filebuf<_CharT, _Traits>::open(const string&, std::ios_base::openmode)':
/usr/include/c++/4.8/fstream:281:25: error: request for member 'c_str' in '__s', which is of non-class type 'const string {aka const int}'
       { return open(__s.c_str(), __mode); }
                         ^
jumatate1.cpp: In function 'int main()':
jumatate1.cpp:72:5: error: redefinition of 'int main()'
 int main()

     ^
jumatate1.cpp:7:5: error: 'int main()' previously defined here
 int main()

     ^
In file included from /usr/include/c++/4.8/bits/basic_string.h:2815:0,
                 from /usr/include/c++/4.8/string:52,
                 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 jumatate1.cpp:43:
/usr/include/c++/4.8/ext/string_conversions.h: In instantiation of '_String __gnu_cxx::__to_xstring(int (*)(_CharT*, std::size_t, const _CharT*, char*), std::size_t, const _CharT*, ...) [with _String = int; _CharT = char; std::size_t = unsigned int]':
/usr/include/c++/4.8/bits/basic_string.h:2866:20:   required from here
/usr/include/c++/4.8/ext/string_conversions.h:99:38: error: expression list treated as compound expression in functional cast [-fpermissive]
       return _String(__s, __s + __len);
                                      ^
/usr/include/c++/4.8/ext/string_conversions.h: In instantiation of '_String __gnu_cxx::__to_xstring(int (*)(_CharT*, std::size_t, const _CharT*, char*), std::size_t, const _CharT*, ...) [with _String = int; _CharT = wchar_t; std::size_t = unsigned int]':
/usr/include/c++/4.8/bits/basic_string.h:2967:22:   required from here
/usr/include/c++/4.8/ext/string_conversions.h:99:38: error: expression list treated as compound expression in functional cast [-fpermissive]
jumatate1.cpp: In function 'int main()':
jumatate1.cpp:9:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     freopen("jumatate1.in","r",stdin);

                                      ^
jumatate1.cpp:10:40: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     freopen("jumatate1.out","w",stdout);

                                        ^
jumatate1.cpp:11:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld\n",&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 Jumatate1 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ă.