#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 | #64826424 | Utilizator | |
| Fișier | ordcol.cpp | Dimensiune | 623 B |
| Data încărcării | 04 Iunie 2026, 02:58 | Scor/rezultat | 0 puncte |
ordcol.cpp: In function ‘int main()’: ordcol.cpp:15:17: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 15 | for(i=0; i<n; i++) | ^~~ ordcol.cpp:17:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 17 | a[i][j1]=a[i][j2]; | ^ ordcol.cpp:18:29: warning: ‘aux’ may be used uninitialized [-Wmaybe-uninitialized] 18 | a[i][j2]=aux; | ~~~~~~~~^~~~ ordcol.cpp:5:38: note: ‘aux’ was declared here 5 | long int a[100][100], n, m, i, j,aux; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.005 secunde | Caught fatal signal 6 | 40 | 0 | ||
| Punctaj total | 0 | |||||
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ă.