Detalii evaluare #64789997

Rezumat problemă

În laboratoarele Marii Ghilde, ucenicul Jean Carapace are pe masa de lucru N eprubete asezate in linie. Eprubetele sunt numerotate de la stanga la dreapta cu indici de la 1 la N. Fiecare eprubetă i conține inițial o cantitate de Esență Primordială, V[i] , număr natural nenul. Definim o „Pereche Pură” ca fiind două eprubete vecine ale căror cantități sunt reprezentate prin numere prime între ele, adică cmmdc(V[i] , V[i+1]) = 1. O proprietate esențială a configurației inițiale este că se garantează existent, a a cel puțin unei astfel de perechi.

Scopul lui este să obțină „Scara Perfectă”, adică o configurație în care cantitatea de esență din fiecare eprubetă este
egală cu indicele ei:

Eprubeta 1 = 1, Eprubeta 2 = 2, …, Eprubeta N = N.

Pentru a modifica nivelul substanței, el poate folosi doar fenomenul de Rezonanță între două eprubete vecine. Mai exact, operațiile se aplică pe două eprubete situate la indicii A și B, cu condiția ca |A − B| = 1. Operațiile permise sunt:

  • adun A BV[A] ← V[A] + V[B] (Eprubeta A câștigă o cantitate de esență egală cu valoarea din eprubeta B)
  • scad A BV[A] ← V[A] − V[B] (Eprubeta A pierde o cantitate de esență egală cu valoarea din eprubeta B)

La aplicarea operațiilor, trebuie respectate următoarele reguli:

1. La fiecare operație, doar eprubeta cu indicele A își modifică valoarea. Eprubeta cu indicele B rămâne neschimbată.
2. Cantitatea de esență din orice eprubetă trebuie să se mențină în intervalul de siguranță [1, 10sup>5] în orice moment (inclusiv intermediar).
3. Numărul total de operații nu poate depăși 106.

Se cunosc C (numărul cerinței, 1 sau 2), N numărul de eprubete, precum și valorile V[i]. Determinați:

  1. Secvența de lungime maximă din șir în care oricare două eprubete alăturate formează o Pereche Pură, dacă C = 1. Dacă există mai multe astfel de secvențe, se va afișa cea cu indicele de început minim.
  2. O succesiune de operații care transformă șirul inițial în Scara Perfectă, respectând toate regulile de mai sus, dacă C = 2.

Detalii

Problema Alchimie Operații I/O alchimie.in/alchimie.out
Limita timp 0.2 secunde Limita memorie Total: 16 MB / Stivă 8 MB
Id soluție #64789997 Utilizator Munteanu Matei Ioan (MunteanuMatei08)
Fișier alchimie.cpp Dimensiune 6.68 KB
Data încărcării 31 Mai 2026, 22:30 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

alchimie.cpp:6:182: error: extended character − is not valid in an identifier
    6 | O secvență în care oricare două elemente vecine sunt prime între ele înseamnă că, pentru o subsecvență de la indicele st la dr, avem cmmdc(V[i],V[i+1])=1 pentru orice i de la st la dr−1.
      |                                                                                                                                                                                      ^
alchimie.cpp:8:49: error: extended character − is not valid in an identifier
    8 | Putem calcula pentru fiecare element de la 1 la N−1 dacă este prim cu vecinul său și să reținem lungimea curentă a secvenței.
      |                                                 ^
alchimie.cpp:9:24: error: extended character „ is not valid in an identifier
    9 | Cerința 2: Construirea „Scării Perfecte” (Strategia Alchimică)
      |                        ^
alchimie.cpp:9:32: error: extended character ” is not valid in an identifier
    9 | Cerința 2: Construirea „Scării Perfecte” (Strategia Alchimică)
      |                                ^
alchimie.cpp:11:52: error: extended character ± is not valid in an identifier
   11 | Avem voie să facem doar operații de tipul V[A]=V[A]±V[B] cu ∣A−B∣=1. Asta seamănă izbitor cu Algoritmul lui Euclid prin scăderi pentru determinarea celui mai mare comun divizor.
      |                                                    ^
alchimie.cpp:11:61: error: extended character ∣ is not valid in an identifier
   11 | Avem voie să facem doar operații de tipul V[A]=V[A]±V[B] cu ∣A−B∣=1. Asta seamănă izbitor cu Algoritmul lui Euclid prin scăderi pentru determinarea celui mai mare comun divizor.
      |                                                             ^
alchimie.cpp:11:61: error: extended character − is not valid in an identifier
alchimie.cpp:11:61: error: extended character ∣ is not valid in an identifier
alchimie.cpp:20:83: error: extended character „ is not valid in an identifier
   20 | Odată ce avem o eprubetă cu valoarea 1 (să zicem pe poziția P), o putem folosi ca „boretă de control” pentru a transforma eprubeta vecină P+1 tot în 1:
      |                                                                                   ^
alchimie.cpp:20:94: error: extended character ” is not valid in an identifier
   20 | Odată ce avem o eprubetă cu valoarea 1 (să zicem pe poziția P), o putem folosi ca „boretă de control” pentru a transforma eprubeta vecină P+1 tot în 1:
      |                                                                                              ^
alchimie.cpp:37:178: error: extended character − is not valid in an identifier
   37 |     În general, parcurgem de la stânga la dreapta de la 2 la N și aplicăm: adun i (i-1). Astfel, fiecare eprubetă i va împrumuta valoarea deja corectată a vecinului din stânga (i−1) și se va aduna cu valoarea ei actuală (1), devenind exact i.
      |                                                                                                                                                                                  ^
alchimie.cpp:39:47: error: extended character ≤ is not valid in an identifier
   39 | Toate valorile intermediare vor fi între 1 și N≤105, deci nu părăsim intervalul de siguranță, iar numărul de operații va fi cu mult sub limita de 106.
      |                                               ^
alchimie.cpp:1:1: error: ‘Aceasta’ does not name a type
    1 | Aceasta este o problemă superbă de algebră și programare (specifică concursurilor de informatică precum ONI / RoAlgo / InfoOltenia).
      | ^~~~~~~
In file included from /usr/include/c++/13/iosfwd:42,
                 from /usr/include/c++/13/ios:40,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from alchimie.cpp:45:
/usr/include/c++/13/bits/postypes.h:68:11: error: ‘ptrdiff_t’ does not name a type
   68 |   typedef ptrdiff_t     streamsize; // Signed integral type
      |           ^~~~~~~~~
/usr/include/c++/13/bits/postypes.h:41:1: note: ‘ptrdiff_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
   40 | #include <cwchar> // For mbstate_t
  +++ |+#include <cstddef>
   41 | 
In file included from /usr/include/c++/13/bits/exception_ptr.h:38,
                 from /usr/include/c++/13/exception:164,
                 from /usr/include/c++/13/ios:41:
/usr/include/c++/13/new:126:26: error: declaration of ‘operator new’ as non-function
  126 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/13/new:126:44: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  126 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                            ^~~~~~
In file included from /usr/include/wchar.h:35,
                 from /usr/include/c++/13/cwchar:44,
                 from /usr/include/c++/13/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/new:127:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  127 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/13/new:128:26: error: declaration of ‘operator new []’ as non-function
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/13/new:128:46: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/new:129:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  129 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/13/new:140:26: error: declaration of ‘operator new’ as non-function
  140 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/13/new:140:44: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  140 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/new:140:52: error: expected primary-expression before ‘const’
  140 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                    ^~~~~
/usr/include/c++/13/new:142:26: error: declaration of ‘operator new []’ as non-function
  142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/13/new:142:46: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/new:142:54: error: expected primary-expression before ‘const’
  142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                      ^~~~~
/usr/include/c++/13/new:174:33: error: declaration of ‘operator new’ as non-function
  174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                 ^~~~~~~~
/usr/include/c++/13/new:174:51: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                                   ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/new:174:59: error: expected primary-expression before ‘void’
  174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                                           ^~~~
/usr/include/c++/13/new:176:33: error: declaration of ‘operator new []’ as non-function
  176 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                 ^~~~~~~~
/usr/include/c++/13/new:176:53: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  176 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/new:176:61: error: expected primary-expression before ‘void’
  176 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                                             ^~~~
In file included from /usr/include/c++/13/bits/move.h:37,
                 from /usr/include/c++/13/bits/exception_ptr.h:41:
/usr/include/c++/13/type_traits:510:31: error: ‘std::size_t’ has not been declared
  510 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/13/type_traits:511:25: error: ‘_Size’ was not declared in this scope
  511 |     struct is_array<_Tp[_Size]>
      |                         ^~~~~
/usr/include/c++/13/type_traits:511:31: error: template argument 1 is invalid
  511 |     struct is_array<_Tp[_Size]>
      |                               ^
/usr/include/c++/13/type_traits:617:33: error: ‘nullptr_t’ is not a member of ‘std’; did you mean ‘nullptr_t’?
  617 |     struct is_null_pointer<std::nullptr_t>
      |                                 ^~~~~~~~~
In file included from /usr/include/c++/13/bits/cxxabi_init_exception.h:38,
                 from /usr/include/c++/13/bits/exception_ptr.h:36:
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:443:29: note: ‘nullptr_t’ declared here
  443 |   typedef decltype(nullptr) nullptr_t;
      |                             ^~~~~~~~~
/usr/include/c++/13/type_traits:617:33: error: ‘nullptr_t’ is not a member of ‘std’; did you mean ‘nullptr_t’?
  617 |     struct is_null_pointer<std::nullptr_t>
      |                                 ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:443:29: note: ‘nullptr_t’ declared here
  443 |   typedef decltype(nullptr) nullptr_t;
      |                             ^~~~~~~~~
/usr/include/c++/13/type_traits:617:42: error: template argument 1 is invalid
  617 |     struct is_null_pointer<std::nullptr_t>
      |                                          ^
/usr/include/c++/13/type_traits:621:48: error: template argument 1 is invalid
  621 |     struct is_null_pointer<const std::nullptr_t>
      |                                                ^
/usr/include/c++/13/type_traits:625:51: error: template argument 1 is invalid
  625 |     struct is_null_pointer<volatile std::nullptr_t>
      |                                                   ^
/usr/include/c++/13/type_traits:629:57: error: template argument 1 is invalid
  629 |     struct is_null_pointer<const volatile std::nullptr_t>
      |                                                         ^
/usr/include/c++/13/type_traits:1348:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1348 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1348:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1348 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1348:57: error: template argument 1 is invalid
 1348 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                                         ^
/usr/include/c++/13/type_traits:1348:57: note: invalid template non-type parameter
/usr/include/c++/13/type_traits:1357:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1357 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1357:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1357 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1357:46: error: template argument 1 is invalid
 1357 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/13/type_traits:1357:46: note: invalid template non-type parameter
/usr/include/c++/13/type_traits:1359:31: error: ‘std::size_t’ has not been declared
 1359 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/13/type_traits:1360:21: error: ‘_Size’ was not declared in this scope
 1360 |     struct rank<_Tp[_Size]>
      |                     ^~~~~
/usr/include/c++/13/type_traits:1360:27: error: template argument 1 is invalid
 1360 |     struct rank<_Tp[_Size]>
      |                           ^
/usr/include/c++/13/type_traits:1361:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1361 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1361:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1361 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1361:65: error: template argument 1 is invalid
 1361 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/13/type_traits:1361:65: note: invalid template non-type parameter
/usr/include/c++/13/type_traits:1365:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1365 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1365:37: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
 1365 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/type_traits:1365:65: error: template argument 1 is invalid
 1365 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/13/type_traits:1365:65: note: invalid template non-type parameter
/usr/include/c++/13/type_traits:1993:31: error: ‘std::size_t’ has not been declared
 1993 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/13/type_traits:1994:30: error: ‘_Size’ was not declared in this scope
 1994 |     struct remove_extent<_Tp[_Size]>
      |                              ^~~~~
/usr/include/c++/13/type_traits:1994:36: error: template argument 1 is invalid
 1994 |     struct remove_extent<_Tp[_Size]>
      |                                    ^
/usr/include/c++/13/type_traits:2006:31: error: ‘std::size_t’ has not been declared
 2006 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/13/type_traits:2007:35: error: ‘_Size’ was not declared in this scope
 2007 |     struct remove_all_extents<_Tp[_Size]>
      |                                   ^~~~~
/usr/include/c++/13/type_traits:2007:41: error: template argument 1 is invalid
 2007 |     struct remove_all_extents<_Tp[_Size]>
      |                                         ^
/usr/include/c++/13/type_traits:2072:17: error: ‘std::size_t’ has not been declared
 2072 |   template<std::size_t _Len>
      |                 ^~~~~~
/usr/include/c++/13/type_traits:2077:30: error: ‘_Len’ was not declared in this scope
 2077 |         unsigned char __data[_Len];
      |                              ^~~~
/usr/include/c++/13/type_traits:2095:17: error: ‘std::size_t’ has not been declared
 2095 |   template<std::size_t _Len, std::size_t _Align =
      |                 ^~~~~~
/usr/include/c++/13/type_traits:2095:35: error: ‘std::size_t’ has not been declared
 2095 |   template<std::size_t _Len, std::size_t _Align =
      |                                   ^~~~~~
/usr/include/c++/13/type_traits:2096:55: error: ‘_Len’ was not declared in this scope
 2096 |            __alignof__(typename __aligned_storage_msa<_Len>::__type)>
      |                                                       ^~~~
/usr/include/c++/13/type_traits:2096:59: error: template argument 1 is invalid
 2096 |            __alignof__(typename __aligned_storage_msa<_Len>::__type)>
      |                                                           ^
/usr/include/c++/13/type_traits:2103:30: error: ‘_Len’ was not declared in this scope
 2103 |         unsigned char __data[_Len];
      |                              ^~~~
/usr/include/c++/13/type_traits:2104:44: error: ‘_Align’ was not declared in this scope
 2104 |         struct __attribute__((__aligned__((_Align)))) { } __align;
      |                                            ^~~~~~
In file included from /usr/include/c++/13/ios:42:
/usr/include/c++/13/bits/char_traits.h:144:66: error: ‘std::size_t’ has not been declared
  144 |       compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
      |                                                                  ^~~~~~
/usr/include/c++/13/bits/char_traits.h:146:40: error: ‘size_t’ in namespace ‘std’ does not name a type
  146 |       static _GLIBCXX14_CONSTEXPR std::size_t
      |                                        ^~~~~~
/usr/include/c++/13/bits/char_traits.h:150:39: error: ‘std::size_t’ has not been declared
  150 |       find(const char_type* __s, std::size_t __n, const char_type& __a);
      |                                       ^~~~~~
/usr/include/c++/13/bits/char_traits.h:153:57: error: ‘std::size_t’ has not been declared
  153 |       move(char_type* __s1, const char_type* __s2, std::size_t __n);
      |                                                         ^~~~~~
/usr/include/c++/13/bits/char_traits.h:156:57: error: ‘std::size_t’ has not been declared
  156 |       copy(char_type* __s1, const char_type* __s2, std::size_t __n);
      |                                                         ^~~~~~
/usr/include/c++/13/bits/char_traits.h:159:35: error: ‘std::size_t’ has not been declared
  159 |       assign(char_type* __s, std::size_t __n, char_type __a);
      |                                   ^~~~~~
/usr/include/c++/13/bits/char_traits.h:187:64: error: ‘std::size_t’ has not been declared
  187 |     compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
      |                                                                ^~~~~~
/usr/include/c++/13/bits/char_traits.h: In static member function ‘static int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)’:
/usr/include/c++/13/bits/char_traits.h:189:17: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  189 |       for (std::size_t __i = 0; __i < __n; ++__i)
      |                 ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/bits/char_traits.h:189:33: error: ‘__i’ was not declared in this scope; did you mean ‘__n’?
  189 |       for (std::size_t __i = 0; __i < __n; ++__i)
      |                                 ^~~
      |                                 __n
/usr/include/c++/13/bits/char_traits.h: At global scope:
/usr/include/c++/13/bits/char_traits.h:198:31: error: ‘size_t’ in namespace ‘std’ does not name a type
  198 |     _GLIBCXX14_CONSTEXPR std::size_t
      |                               ^~~~~~
/usr/include/c++/13/bits/char_traits.h:211:37: error: ‘std::size_t’ has not been declared
  211 |     find(const char_type* __s, std::size_t __n, const char_type& __a)
      |                                     ^~~~~~
/usr/include/c++/13/bits/char_traits.h: In static member function ‘static const __gnu_cxx::char_traits<_CharT>::char_type* __gnu_cxx::char_traits<_CharT>::find(const char_type*, int, const char_type&)’:
/usr/include/c++/13/bits/char_traits.h:213:17: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  213 |       for (std::size_t __i = 0; __i < __n; ++__i)
      |                 ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/bits/char_traits.h:213:33: error: ‘__i’ was not declared in this scope; did you mean ‘__s’?
  213 |       for (std::size_t __i = 0; __i < __n; ++__i)
      |                                 ^~~
      |                                 __s
/usr/include/c++/13/bits/char_traits.h: At global scope:
/usr/include/c++/13/bits/char_traits.h:223:55: error: ‘std::size_t’ has not been declared
  223 |     move(char_type* __s1, const char_type* __s2, std::size_t __n)
      |                                                       ^~~~~~
/usr/include/c++/13/bits/char_traits.h:254:55: error: ‘std::size_t’ has not been declared
  254 |     copy(char_type* __s1, const char_type* __s2, std::size_t __n)
      |                                                       ^~~~~~
/usr/include/c++/13/bits/char_traits.h:274:33: error: ‘std::size_t’ has not been declared
  274 |     assign(char_type* __s, std::size_t __n, char_type __a)
      |                                 ^~~~~~
/usr/include/c++/13/bits/char_traits.h: In static member function ‘static __gnu_cxx::char_traits<_CharT>::char_type* __gnu_cxx::char_traits<_CharT>::assign(char_type*, int, char_type)’:
/usr/include/c++/13/bits/char_traits.h:296:21: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  296 |           for (std::size_t __i = 0; __i < __n; ++__i)
      |                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/13/bits/char_traits.h:296:37: error: ‘__i’ was not declared in this scope; did you mean ‘__s’?
  296 |           for (std::size_t __i = 0; __i < __n; ++__i)
      |                                     ^~~
      |                                     __s
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/c++allocator.h:33,
                 from /usr/include/c++/13/bits/allocator.h:46,
                 from /usr/include/c++/13/string:43,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44:
/usr/include/c++/13/bits/new_allocator.h: At global scope:
/usr/include/c++/13/bits/new_allocator.h:67:20: error: ‘size_t’ in namespace ‘std’ does not name a type
   67 |       typedef std::size_t     size_type;
      |                    ^~~~~~
/usr/include/c++/13/bits/new_allocator.h:68:20: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type
   68 |       typedef std::ptrdiff_t  difference_type;
      |                    ^~~~~~~~~
/usr/include/c++/13/bits/new_allocator.h:126:16: error: ‘size_type’ has not been declared
  126 |       allocate(size_type __n, const void* = static_cast<const void*>(0))
      |                ^~~~~~~~~
/usr/include/c++/13/bits/new_allocator.h:156:28: error: ‘size_type’ has not been declared
  156 |       deallocate(_Tp* __p, size_type __n __attribute__ ((__unused__)))
      |                            ^~~~~~~~~
/usr/include/c++/13/bits/new_allocator.h:181:7: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
  181 |       size_type
      |       ^~~~~~~~~
      |       true_type
/usr/include/c++/13/bits/new_allocator.h:229:26: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
  229 |       _GLIBCXX_CONSTEXPR size_type
      |                          ^~~~~~~~~
      |                          true_type
/usr/include/c++/13/bits/new_allocator.h: In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(int, const void*)’:
/usr/include/c++/13/bits/new_allocator.h:138:29: error: ‘size_t’ is not a member of ‘std’; did you mean ‘size_t’?
  138 |             if (__n > (std::size_t(-1) / sizeof(_Tp)))
      |                             ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:214:23: note: ‘size_t’ declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/13/string:46:
/usr/include/c++/13/bits/ostream_insert.h: At global scope:
/usr/include/c++/13/bits/ostream_insert.h:48:40: error: ‘streamsize’ has not been declared
   48 |                     const _CharT* __s, streamsize __n)
      |                                        ^~~~~~~~~~
/usr/include/c++/13/bits/ostream_insert.h: In function ‘void std::__ostream_write(basic_ostream<_CharT, _Traits>&, const _CharT*, int)’:
/usr/include/c++/13/bits/ostream_insert.h:53:13: error: ‘streamsize’ does not name a type
   53 |       const streamsize __put = __out.rdbuf()->sputn(__s, __n);
      |             ^~~~~~~~~~
/usr/include/c++/13/bits/ostream_insert.h:54:11: error: ‘__put’ was not declared in this scope; did you mean ‘__out’?
   54 |       if (__put != __n)
      |           ^~~~~
      |           __out
/usr/include/c++/13/bits/ostream_insert.h: At global scope:
/usr/include/c++/13/bits/ostream_insert.h:60:59: error: ‘streamsize’ has not been declared
   60 |     __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
      |                                                           ^~~~~~~~~~
/usr/include/c++/13/bits/ostream_insert.h:80:41: error: ‘streamsize’ has not been declared
   80 |                      const _CharT* __s, streamsize __n)
      |                                         ^~~~~~~~~~
/usr/include/c++/13/bits/ostream_insert.h: In function ‘std::basic_ostream<_CharT, _Traits>& std::__ostream_insert(basic_ostream<_CharT, _Traits>&, const _CharT*, int)’:
/usr/include/c++/13/bits/ostream_insert.h:90:21: error: ‘streamsize’ does not name a type
   90 |               const streamsize __w = __out.width();
      |                     ^~~~~~~~~~
/usr/include/c++/13/bits/ostream_insert.h:91:19: error: ‘__w’ was not declared in this scope; did you mean ‘__s’?
   91 |               if (__w > __n)
      |                   ^~~
      |                   __s
/usr/include/c++/13/bits/ostream_insert.h: At global scope:
/usr/include/c++/13/bits/ostream_insert.h:121:68: error: ‘streamsize’ has not been declared
  121 |   extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
      |                                                                    ^~~~~~~~~~
/usr/include/c++/13/bits/ostream_insert.h:125:46: error: ‘streamsize’ has not been declared
  125 |                                              streamsize);
      |                                              ^~~~~~~~~~
In file included from /usr/include/c++/13/bits/stl_iterator.h:65,
                 from /usr/include/c++/13/string:48:
/usr/include/c++/13/ext/type_traits.h:164:35: error: ‘constexpr const bool __gnu_cxx::__is_null_pointer’ redeclared as different kind of entity
  164 |   __is_null_pointer(std::nullptr_t)
      |                                   ^
/usr/include/c++/13/ext/type_traits.h:159:5: note: previous declaration ‘template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)’
  159 |     __is_null_pointer(_Type)
      |     ^~~~~~~~~~~~~~~~~
/usr/include/c++/13/ext/type_traits.h:164:26: error: ‘nullptr_t’ is not a member of ‘std’; did you mean ‘nullptr_t’?
  164 |   __is_null_pointer(std::nullptr_t)
      |                          ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h:443:29: note: ‘nullptr_t’ declared here
  443 |   typedef decltype(nullptr) nullptr_t;
      |                             ^~~~~~~~~
In file included from /usr/include/c++/13/ext/alloc_traits.h:34,
                 from /usr/include/c++/13/bits/basic_string.h:39,
                 from /usr/include/c++/13/string:54:
/usr/include/c++/13/bits/alloc_traits.h:449:36: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type
  449 |       using difference_type = std::ptrdiff_t;
      |                                    ^~~~~~~~~
/usr/include/c++/13/bits/alloc_traits.h:452:30: error: ‘size_t’ in namespace ‘std’ does not name a type
  452 |       using size_type = std::size_t;
      |                              ^~~~~~
/usr/include/c++/13/bits/alloc_traits.h:481:37: error: ‘size_type’ has not been declared
  481 |       allocate(allocator_type& __a, size_type __n)
      |                                     ^~~~~~~~~
/usr/include/c++/13/bits/alloc_traits.h:496:37: error: ‘size_type’ has not been declared
  496 |       allocate(allocator_type& __a, size_type __n,
      |                                     ^~~~~~~~~
/usr/include/c++/13/bits/alloc_traits.h:516:52: error: ‘size_type’ has not been declared
  516 |       deallocate(allocator_type& __a, pointer __p, size_type __n)
      |                                                    ^~~~~~~~~
/usr/include/c++/13/bits/alloc_traits.h:570:35: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
  570 |       static _GLIBCXX20_CONSTEXPR size_type
      |                                   ^~~~~~~~~
      |                                   true_type
/usr/include/c++/13/bits/alloc_traits.h:614:36: error: ‘ptrdiff_t’ in namespace ‘std’ does not name a type
  614 |       using difference_type = std::ptrdiff_t;
      |                                    ^~~~~~~~~
/usr/include/c++/13/bits/alloc_traits.h:617:30: error: ‘size_t’ in namespace ‘std’ does not name a type
  617 |       using size_type = std::size_t;
      |                              ^~~~~~
/usr/include/c++/13/bits/alloc_traits.h:639:33: error: ‘size_type’ has not been declared
  639 |       allocate(allocator_type&, size_type, const void* = nullptr) = delete;
      |                                 ^~~~~~~~~
/usr/include/c++/13/bits/alloc_traits.h:643:42: error: ‘size_type’ has not been declared
  643 |       deallocate(allocator_type&, void*, size_type) = delete;
      |                                          ^~~~~~~~~
/usr/include/c++/13/bits/alloc_traits.h:678:14: error: ‘size_type’ does not name a type; did you mean ‘true_type’?
  678 |       static size_type
      |              ^~~~~~~~~
      |              true_type
In file included from /usr/include/c++/13/bits/basic_string.h:4109:
/usr/include/c++/13/ext/string_conversions.h:57:58: error: ‘std::size_t’ has not been declared
   57 |            const char* __name, const _CharT* __str, std::size_t* __idx,
      |                                                          ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:101:48: error: ‘std::size_t’ has not been declared
  101 |     __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*,
      |                                                ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:102:59: error: ‘std::size_t’ has not been declared
  102 |                                  __builtin_va_list), std::size_t __n,
      |                                                           ^~~~~~
/usr/include/c++/13/ext/alloc_traits.h: In instantiation of ‘struct __gnu_cxx::__alloc_traits<std::allocator<char>, char>’:
/usr/include/c++/13/bits/basic_string.h:90:24:   required from ‘class std::__cxx11::basic_string<char>’
/usr/include/c++/13/bits/basic_string.h:4121:68:   required from here
/usr/include/c++/13/ext/alloc_traits.h:56:53: error: no type named ‘size_type’ in ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::_Base_type’ {aka ‘struct std::allocator_traits<std::allocator<char> >’}
   56 |     typedef typename _Base_type::size_type          size_type;
      |                                                     ^~~~~~~~~
/usr/include/c++/13/ext/alloc_traits.h:57:53: error: no type named ‘difference_type’ in ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::_Base_type’ {aka ‘struct std::allocator_traits<std::allocator<char> >’}
   57 |     typedef typename _Base_type::difference_type    difference_type;
      |                                                     ^~~~~~~~~~~~~~~
/usr/include/c++/13/ext/alloc_traits.h:65:23: error: ‘max_size’ has not been declared in ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::_Base_type’
   65 |     using _Base_type::max_size;
      |                       ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘int std::__cxx11::stoi(const std::string&, size_t*, int)’:
/usr/include/c++/13/bits/basic_string.h:4121:40: error: no matching function for call to ‘__stoa<long int, int>(long int (*)(const char*, char**, int) noexcept, const char [5], const char*, size_t*&, int&)’
 4121 |   { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4122 |                                         __idx, __base); }
      |                                         ~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4122:41: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4122 |                                         __idx, __base); }
      |                                         ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘long int std::__cxx11::stol(const std::string&, size_t*, int)’:
/usr/include/c++/13/bits/basic_string.h:4126:29: error: no matching function for call to ‘__stoa(long int (*)(const char*, char**, int) noexcept, const char [5], const char*, size_t*&, int&)’
 4126 |   { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4127 |                              __idx, __base); }
      |                              ~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4127:30: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4127 |                              __idx, __base); }
      |                              ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘long unsigned int std::__cxx11::stoul(const std::string&, size_t*, int)’:
/usr/include/c++/13/bits/basic_string.h:4131:29: error: no matching function for call to ‘__stoa(long unsigned int (*)(const char*, char**, int) noexcept, const char [6], const char*, size_t*&, int&)’
 4131 |   { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(),
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4132 |                              __idx, __base); }
      |                              ~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4132:30: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4132 |                              __idx, __base); }
      |                              ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘long long int std::__cxx11::stoll(const std::string&, size_t*, int)’:
/usr/include/c++/13/bits/basic_string.h:4136:29: error: no matching function for call to ‘__stoa(long long int (*)(const char*, char**, int) noexcept, const char [6], const char*, size_t*&, int&)’
 4136 |   { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4137 |                              __idx, __base); }
      |                              ~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4137:30: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4137 |                              __idx, __base); }
      |                              ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘long long unsigned int std::__cxx11::stoull(const std::string&, size_t*, int)’:
/usr/include/c++/13/bits/basic_string.h:4141:29: error: no matching function for call to ‘__stoa(long long unsigned int (*)(const char*, char**, int) noexcept, const char [7], const char*, size_t*&, int&)’
 4141 |   { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4142 |                              __idx, __base); }
      |                              ~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4142:30: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4142 |                              __idx, __base); }
      |                              ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘float std::__cxx11::stof(const std::string&, size_t*)’:
/usr/include/c++/13/bits/basic_string.h:4147:29: error: no matching function for call to ‘__stoa(float (*)(const char*, char**) noexcept, const char [5], const char*, size_t*&)’
 4147 |   { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4147:67: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4147 |   { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
      |                                                                   ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘double std::__cxx11::stod(const std::string&, size_t*)’:
/usr/include/c++/13/bits/basic_string.h:4151:29: error: no matching function for call to ‘__stoa(double (*)(const char*, char**) noexcept, const char [5], const char*, size_t*&)’
 4151 |   { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4151:67: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4151 |   { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
      |                                                                   ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘long double std::__cxx11::stold(const std::string&, size_t*)’:
/usr/include/c++/13/bits/basic_string.h:4155:29: error: no matching function for call to ‘__stoa(long double (*)(const char*, char**) noexcept, const char [6], const char*, size_t*&)’
 4155 |   { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note: candidate: ‘template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)’
   56 |     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
      |     ^~~~~~
/usr/include/c++/13/ext/string_conversions.h:56:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4155:69: note:   cannot convert ‘__idx’ (type ‘size_t*’ {aka ‘long unsigned int*’}) to type ‘int*’
 4155 |   { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
      |                                                                     ^~~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(int)’:
/usr/include/c++/13/bits/basic_string.h:4170:36: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(unsigned int, char)’
 4170 |     string __str(__neg + __len, '-');
      |                                    ^
/usr/include/c++/13/bits/basic_string.h:641:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:641:53: note:   no known conversion for argument 2 from ‘char’ to ‘const std::allocator<char>&’
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |                                       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:760:9: note: candidate: ‘template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  760 |         basic_string(_InputIterator __beg, _InputIterator __end,
      |         ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:760:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4170:36: note:   deduced conflicting types for parameter ‘_InputIterator’ (‘unsigned int’ and ‘char’)
 4170 |     string __str(__neg + __len, '-');
      |                                    ^
/usr/include/c++/13/bits/basic_string.h:716:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  716 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:716:35: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘std::__cxx11::basic_string<char>&&’
  716 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |                    ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/bits/basic_string.h:711:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  711 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:711:40: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘const std::__cxx11::basic_string<char>&’
  711 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/bits/basic_string.h:706:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:706:45: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘std::initializer_list<char>’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/basic_string.h:677:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  677 |       basic_string(basic_string&& __str) noexcept
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:677:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:547:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  547 |       basic_string(const basic_string& __str)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:547:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:535:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  535 |       basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:535:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:522:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  522 |       basic_string()
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:522:7: note:   candidate expects 0 arguments, 2 provided
/usr/include/c++/13/bits/basic_string.h:4171:40: error: no match for ‘operator[]’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘const bool’)
 4171 |     __detail::__to_chars_10_impl(&__str[__neg], __len, __uval);
      |                                        ^
/usr/include/c++/13/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(unsigned int)’:
/usr/include/c++/13/bits/basic_string.h:4182:55: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(unsigned int, char)’
 4182 |     string __str(__detail::__to_chars_len(__val), '\0');
      |                                                       ^
/usr/include/c++/13/bits/basic_string.h:641:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:641:53: note:   no known conversion for argument 2 from ‘char’ to ‘const std::allocator<char>&’
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |                                       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:760:9: note: candidate: ‘template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  760 |         basic_string(_InputIterator __beg, _InputIterator __end,
      |         ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:760:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4182:55: note:   deduced conflicting types for parameter ‘_InputIterator’ (‘unsigned int’ and ‘char’)
 4182 |     string __str(__detail::__to_chars_len(__val), '\0');
      |                                                       ^
/usr/include/c++/13/bits/basic_string.h:716:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  716 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:716:35: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘std::__cxx11::basic_string<char>&&’
  716 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |                    ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/bits/basic_string.h:711:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  711 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:711:40: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘const std::__cxx11::basic_string<char>&’
  711 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/bits/basic_string.h:706:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:706:45: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘std::initializer_list<char>’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/basic_string.h:677:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  677 |       basic_string(basic_string&& __str) noexcept
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:677:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:547:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  547 |       basic_string(const basic_string& __str)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:547:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:535:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  535 |       basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:535:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:522:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  522 |       basic_string()
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:522:7: note:   candidate expects 0 arguments, 2 provided
/usr/include/c++/13/bits/basic_string.h:4183:40: error: no match for ‘operator[]’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘int’)
 4183 |     __detail::__to_chars_10_impl(&__str[0], __str.size(), __val);
      |                                        ^
/usr/include/c++/13/bits/basic_string.h:4183:51: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘size’
 4183 |     __detail::__to_chars_10_impl(&__str[0], __str.size(), __val);
      |                                                   ^~~~
/usr/include/c++/13/bits/basic_string.h: In function ‘std::string std::__cxx11::to_string(long int)’:
/usr/include/c++/13/bits/basic_string.h:4197:36: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(unsigned int, char)’
 4197 |     string __str(__neg + __len, '-');
      |                                    ^
/usr/include/c++/13/bits/basic_string.h:641:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:641:53: note:   no known conversion for argument 2 from ‘char’ to ‘const std::allocator<char>&’
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |                                       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:760:9: note: candidate: ‘template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  760 |         basic_string(_InputIterator __beg, _InputIterator __end,
      |         ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:760:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:4197:36: note:   deduced conflicting types for parameter ‘_InputIterator’ (‘unsigned int’ and ‘char’)
 4197 |     string __str(__neg + __len, '-');
      |                                    ^
/usr/include/c++/13/bits/basic_string.h:716:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  716 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:716:35: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘std::__cxx11::basic_string<char>&&’
  716 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |                    ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/bits/basic_string.h:711:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  711 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:711:40: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘const std::__cxx11::basic_string<char>&’
  711 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/bits/basic_string.h:706:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:706:45: note:   no known conversion for argument 1 from ‘unsigned int’ to ‘std::initializer_list<char>’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/basic_string.h:677:7: note: candi

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

Du-te sus!