Detalii evaluare #64706427

Rezumat problemă

Se dă o matrice cu n linii și m coloane, formată din 2 tipuri de caractere: '$' și '.'. Trebuie acoperite toate caracterele '.' cu piese 1x2 sau 2x1. Dacă se poate realiza acoperirea într-un mod unic, se va afișa matricea completată, altfel se va afișa mesajul "altadata".

Detalii

Problema Fill_1221 Operații I/O tastatură/ecran
Limita timp 0.03 secunde Limita memorie Total: 21 MB / Stivă 12 MB
Id soluție #64706427 Utilizator 6B Vicu Stefan (stefan_vicu)
Fișier fill_1221.cpp Dimensiune 866 B
Data încărcării 25 Mai 2026, 10:50 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

fill_1221.cpp: In function ‘int main()’:
fill_1221.cpp:31:19: error: no match for ‘operator++’ (operand type is ‘poz’)
   31 |                 s[++k].x=i;
      |                   ^~~
fill_1221.cpp:32:19: error: no match for ‘operator++’ (operand type is ‘poz’)
   32 |                 s[++k].y=j;
      |                   ^~~
fill_1221.cpp:36:12: error: no match for ‘operator>’ (operand types are ‘poz’ and ‘int’)
   36 |     while(k>0) {
      |           ~^~
      |           | |
      |           | int
      |           poz
In file included from /usr/include/c++/13/string:48,
                 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,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from fill_1221.cpp:1:
/usr/include/c++/13/bits/stl_iterator.h:469:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’
  469 |     operator>(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:469:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   ‘poz’ is not derived from ‘const std::reverse_iterator<_Iterator>’
   36 |     while(k>0) {
      |             ^
/usr/include/c++/13/bits/stl_iterator.h:514:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’
  514 |     operator>(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:514:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   ‘poz’ is not derived from ‘const std::reverse_iterator<_Iterator>’
   36 |     while(k>0) {
      |             ^
/usr/include/c++/13/bits/stl_iterator.h:1725:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’
 1725 |     operator>(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1725:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   ‘poz’ is not derived from ‘const std::move_iterator<_IteratorL>’
   36 |     while(k>0) {
      |             ^
/usr/include/c++/13/bits/stl_iterator.h:1784:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’
 1784 |     operator>(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1784:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   ‘poz’ is not derived from ‘const std::move_iterator<_IteratorL>’
   36 |     while(k>0) {
      |             ^
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/string:51:
/usr/include/c++/13/bits/stl_pair.h:848:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’
  848 |     operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:848:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   ‘poz’ is not derived from ‘const std::pair<_T1, _T2>’
   36 |     while(k>0) {
      |             ^
In file included from /usr/include/c++/13/string:54:
/usr/include/c++/13/bits/basic_string.h:3870:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
 3870 |     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3870:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   ‘poz’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
   36 |     while(k>0) {
      |             ^
/usr/include/c++/13/bits/basic_string.h:3884:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)’
 3884 |     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3884:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   ‘poz’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
   36 |     while(k>0) {
      |             ^
/usr/include/c++/13/bits/basic_string.h:3897:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
 3897 |     operator>(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3897:5: note:   template argument deduction/substitution failed:
fill_1221.cpp:36:13: note:   mismatched types ‘const _CharT*’ and ‘poz’
   36 |     while(k>0) {
      |             ^

Cum funcționează evaluarea?

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

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

Problema Fill_1221 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!