#191
MaxMat
Să se determine, pentru fiecare linie a unei matrice, elementul maxim și indicele coloanei pe care se află.
Problema | MaxMat | Operații I/O |
![]() maxmat.in /maxmat.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57303075 | Utilizator | |
Fișier | maxmat.cpp | Dimensiune | 581 B |
Data încărcării | 25 Martie 2025, 09:48 | Scor / rezultat | Eroare de compilare |
maxmat.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout("maxmat.out") ^ maxmat.cpp: In function 'int main()': maxmat.cpp:10:6: error: 'n' was not declared in this scope fin>>n>>m; ^ maxmat.cpp:10:9: error: 'm' was not declared in this scope fin>>n>>m; ^ maxmat.cpp:11:5: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ maxmat.cpp:12:9: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ maxmat.cpp:13:10: error: 'a' was not declared in this scope fin>>a[i][j]; ^ maxmat.cpp:15:8: error: 'valmax' was not declared in this scope if(valmax>a[i][j]){ ^ maxmat.cpp:15:15: error: 'a' was not declared in this scope if(valmax>a[i][j]){ ^ maxmat.cpp:15:20: error: 'j' was not declared in this scope if(valmax>a[i][j]){ ^ maxmat.cpp:17:5: error: 'I' was not declared in this scope I=i; ^ maxmat.cpp:22:21: error: 'valmax' was not declared in this scope cout<<valmax<<' '<<I; ^ maxmat.cpp:22:34: error: 'I' was not declared in this scope cout<<valmax<<' '<<I; ^ maxmat.cpp:24:19: error: expected ';' before 'return' return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaxMat 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ă.