#4678
Vi se dă o matrice cu n
linii și m
coloane care memorează numere naturale. Să se reordoneze elementele de pe fiecare linie astfel încât numerele impare să se afle în ordine crescătoare la începutul liniei, iar numerele pare, de asemenea în ordine crescătoare, la sfârșitul liniei.
Folclorul informatic
Problema | MatrixReord | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58133214 | Utilizator | |
Fișier | matrixreord.cpp | Dimensiune | 2.34 KB |
Data încărcării | 15 Mai 2025, 17:25 | Scor / rezultat | Eroare de compilare |
matrixreord.cpp:74:5: error: redefinition of 'int n' int n; ^ matrixreord.cpp:3:5: error: 'int n' previously declared here int n; ^ matrixreord.cpp:75:5: error: redefinition of 'int m' int m; ^ matrixreord.cpp:4:5: error: 'int m' previously declared here int m; ^ matrixreord.cpp:76:13: error: redefinition of 'int M [51][51]' int M[51][51]; ^ matrixreord.cpp:5:5: error: 'int M [51][51]' previously declared here int M[51][51]; ^ matrixreord.cpp:77:9: error: redefinition of 'int P [51]' int P[51]; ^ matrixreord.cpp:6:5: error: 'int P [51]' previously declared here int P[51]; ^ matrixreord.cpp:78:9: error: redefinition of 'int I [51]' int I[51]; ^ matrixreord.cpp:7:5: error: 'int I [51]' previously declared here int I[51]; ^ matrixreord.cpp:79:5: error: redefinition of 'int pa' int pa; ^ matrixreord.cpp:8:5: error: 'int pa' previously declared here int pa; ^ matrixreord.cpp:80:5: error: redefinition of 'int im' int im; ^ matrixreord.cpp:9:5: error: 'int im' previously declared here int im; ^ matrixreord.cpp: In function 'int par(int)': matrixreord.cpp:81:5: error: redefinition of 'int par(int)' int par(int x) ^ matrixreord.cpp:10:5: error: 'int par(int)' previously defined here int par(int x) ^ matrixreord.cpp: In function 'int impar(int)': matrixreord.cpp:87:5: error: redefinition of 'int impar(int)' int impar(int x) ^ matrixreord.cpp:16:5: error: 'int impar(int)' previously defined here int impar(int x) ^ matrixreord.cpp: In function 'int main()': matrixreord.cpp:93:5: error: redefinition of 'int main()' int main() ^ matrixreord.cpp:22:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MatrixReord 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ă.