#509
Să se scrie un program care ordonează crescător elementele unui vector.
| Problema | Ordonare | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64811267 | Utilizator | |
| Fișier | ordonare.cpp | Dimensiune | 363 B |
| Data încărcării | 02 Iunie 2026, 20:37 | Scor/rezultat | 80 puncte |
ordonare.cpp: In function ‘int main()’: ordonare.cpp:12:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for (int i = 1; i <=n ; i++) | ^~~ ordonare.cpp:15:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | for( int i = 1 ; i < n; i++) | ^~~ ordonare.cpp:20:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 20 | for ( int i = 1; i <= n; i++) | ^~~ ordonare.cpp:25:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 25 | return 0; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | OK. | 60 | 60 | ||
| 3 | 0.004 secunde | Caught fatal signal 6 | 20 | 0 | ||
| Punctaj total | 80 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Ordonare 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ă.