#1025
Se dă un șir cu n elemente, numere întregi. Folosind metoda MergeSort, ordonați crescător elementele acestui șir.
| Problema | MergeSort | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64346855 | Utilizator | |
| Fișier | mergesort.cpp | Dimensiune | 1.12 KB |
| Data încărcării | 30 Aprilie 2026, 20:02 | Scor/rezultat | 0 puncte |
mergesort.cpp: In function ‘int pivot1(int, int)’: mergesort.cpp:10:9: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 10 | while(st<dr && v[dr]>=aux) | ^~~~~ mergesort.cpp:12:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 12 | v[st]=v[dr]; | ^ mergesort.cpp: In function ‘void quicksort1(int, int)’: mergesort.cpp:24:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 24 | if(st<m) | ^~ mergesort.cpp:26:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 26 | if(m<dr) | ^~ mergesort.cpp: In function ‘int pivot(int, int)’: mergesort.cpp:34:9: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 34 | while(st<dr && v[dr]<=aux) | ^~~~~ mergesort.cpp:36:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 36 | v[st]=v[dr]; | ^ mergesort.cpp: In function ‘void quicksort(int, int)’: mergesort.cpp:48:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 48 | if(st<m) | ^~ mergesort.cpp:50:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 50 | if(m<dr) | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Caught fatal signal 11 | 40 | 0 | ||
| 3 | 0.002 secunde | Caught fatal signal 11 | 40 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MergeSort 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ă.