#769
Se dă o matrice cu n linii şi m coloane şi elemente numere naturale. Să se ordoneze coloanele matricei astfel încât elementele de pe prima linie să fie ordonate crescător.
| Problema | OrdCol | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64633187 | Utilizator | |
| Fișier | ordcol.cpp | Dimensiune | 469 B |
| Data încărcării | 19 Mai 2026, 15:17 | Scor/rezultat | 100 puncte |
ordcol.cpp: In function ‘int main()’: ordcol.cpp:8:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 8 | for(i=1; i<=n; i++) | ^~~ ordcol.cpp:12:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for(j=1; j<m;j++) | ^~~ ordcol.cpp:12:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] ordcol.cpp:18:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | for(i=1; i<=n; i++) | ^~~ ordcol.cpp:4:14: warning: unused variable ‘k’ [-Wunused-variable] 4 | {int n,m,i,j,k,maxim=-10000,s=0,p; | ^ ordcol.cpp:4:16: warning: unused variable ‘maxim’ [-Wunused-variable] 4 | {int n,m,i,j,k,maxim=-10000,s=0,p; | ^~~~~ ordcol.cpp:4:29: warning: unused variable ‘s’ [-Wunused-variable] 4 | {int n,m,i,j,k,maxim=-10000,s=0,p; | ^ ordcol.cpp:4:33: warning: unused variable ‘p’ [-Wunused-variable] 4 | {int n,m,i,j,k,maxim=-10000,s=0,p; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.004 secunde | OK. | 40 | 40 | ||
| 3 | 0.004 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema OrdCol 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ă.