#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 | #64919869 | Utilizator | |
| Fișier | distanta_de_editare.cpp | Dimensiune | 1.10 KB |
| Data încărcării | 13 Iunie 2026, 14:58 | Scor/rezultat | 100 puncte |
distanta_de_editare.cpp: In function ‘int main()’: distanta_de_editare.cpp:27:23: 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 i = 0; i < a.size(); i++) { | ~~^~~~~~~~~~ distanta_de_editare.cpp:33:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 33 | for (int i = 0; i < b.size(); i++) { | ~~^~~~~~~~~~ distanta_de_editare.cpp:37:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 37 | for (int i = 1; i < s.size(); i++) { | ~~^~~~~~~~~~ distanta_de_editare.cpp:41:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 41 | for (int i = 1; i < t.size(); i++) { | ~~^~~~~~~~~~ distanta_de_editare.cpp:45:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 45 | for (int i = 1; i < s.size(); i++) { | ~~^~~~~~~~~~ distanta_de_editare.cpp:46:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 46 | for (int j = 1; j < t.size(); j++) { | ~~^~~~~~~~~~ distanta_de_editare.cpp: In function ‘int cmp(int, int, int)’: distanta_de_editare.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type] 19 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.002 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.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.002 secunde | OK. | 10 | 10 | ||
| 10 | 0.002 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ă.