#3655
Se dau două șiruri de caractere s și t. Asupra șirului s se pot aplica în mod repetat operațiile:
Pornind de la șirul s se cere să se obțină șirul t aplicând de un număr minim de ori operațiile date.
Folclorul informatic
| Problema | Distanta de editare | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64986884 | Utilizator | |
| Fișier | distanta_de_editare.cpp | Dimensiune | 864 B |
| Data încărcării | 05 Iulie 2026, 00:35 | Scor/rezultat | 100 puncte |
distanta_de_editare.cpp: In function ‘int main()’: distanta_de_editare.cpp:20:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 20 | for(int i=0;i<=a.size();++i){ | ~^~~~~~~~~~ distanta_de_editare.cpp:23:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 23 | for(int i=0;i<=b.size();++i){ | ~^~~~~~~~~~ distanta_de_editare.cpp:26:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 26 | for(int i=1;i<=a.size();++i){ | ~^~~~~~~~~~ distanta_de_editare.cpp:27:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 27 | for(int j=1;j<=b.size();++j){ | ~^~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.002 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.002 secunde | OK. | 10 | 10 | ||
| 6 | 0.002 secunde | OK. | 10 | 10 | ||
| 7 | 0.002 secunde | OK. | 10 | 10 | ||
| 8 | 0.002 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Distanta de editare face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.