#771
OrdLin
Se dă o matrice cu n
linii şi m
coloane şi elemente numere naturale. Să se ordoneze liniile matricei crescător după suma elementelor.
Problema | OrdLin | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53674068 | Utilizator | |
Fișier | ordlin.cpp | Dimensiune | 1.00 KB |
Data încărcării | 07 Noiembrie 2024, 22:32 | Scor / rezultat | Eroare de compilare |
ordlin.cpp:3:2: error: 'lon' does not name a type lon long int a[51][51], i, j, n, m, mini = 10001, aux, l1, lm; ^ ordlin.cpp: In function 'int main()': ordlin.cpp:6:12: error: 'n' was not declared in this scope cin >> n >> m; // Citire matrice ^ ordlin.cpp:6:17: error: 'm' was not declared in this scope cin >> n >> m; // Citire matrice ^ ordlin.cpp:7:10: error: 'i' was not declared in this scope for (i = 1; i <= n; i++) ^ ordlin.cpp:8:14: error: 'j' was not declared in this scope for (j = 1; j <= m; j++) ^ ordlin.cpp:9:20: error: 'a' was not declared in this scope cin >> a[i][j]; ^ ordlin.cpp:12:5: error: 'mini' was not declared in this scope mini = 10001; ^ ordlin.cpp:13:10: error: 'i' was not declared in this scope for (i = 1; i <= n; i++) ^ ordlin.cpp:14:13: error: 'a' was not declared in this scope if (a[i][1] < mini) { ^ ordlin.cpp:16:13: error: 'l1' was not declared in this scope l1 = i; ^ ordlin.cpp:21:10: error: 'i' was not declared in this scope for (i = 1; i <= n; i++) ^ ordlin.cpp:22:13: error: 'a' was not declared in this scope if (a[i][m] < mini) { ^ ordlin.cpp:24:13: error: 'lm' was not declared in this scope lm = i; ^ ordlin.cpp:28:5: error: 'aux' was not declared in this scope aux = a[l1][1]; // Minimul de pe coloana 1 este la coordonatele l1 si 1 ^ ordlin.cpp:28:11: error: 'a' was not declared in this scope aux = a[l1][1]; // Minimul de pe coloana 1 este la coordonatele l1 si 1 ^ ordlin.cpp:28:13: error: 'l1' was not declared in this scope aux = a[l1][1]; // Minimul de pe coloana 1 este la coordonatele l1 si 1 ^ ordlin.cpp:29:18: error: 'lm' was not declared in this scope a[l1][1] = a[lm][m]; // Minimul de pe coloana m este la coordonatele lm si m ^ ordlin.cpp:33:10: error: 'i' was not declared in this scope for (i = 1; i <= n; i++) { ^ ordlin.cpp:34:14: error: 'j' was not declared in this scope for (j = 1; j <= m; j++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema OrdLin 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ă.