#191
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 | #58329406 | Utilizator | |
Fișier | maxmat.cpp | Dimensiune | 545 B |
Data încărcării | 27 Mai 2025, 15:12 | 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:9:10: error: 'n' was not declared in this scope fin>>n>>m; ^ maxmat.cpp:9:13: error: 'm' was not declared in this scope fin>>n>>m; ^ maxmat.cpp:10:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ maxmat.cpp:11:13: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ maxmat.cpp:12:14: error: 'a' was not declared in this scope fin>>a[i][j]; ^ maxmat.cpp:13:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ maxmat.cpp:15:9: error: 'maxi' was not declared in this scope maxi=-1001; ^ maxmat.cpp:16:9: error: 'cm' was not declared in this scope cm=0; ^ maxmat.cpp:17:13: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ maxmat.cpp:18:16: error: 'a' was not declared in this scope if(a[i][j]>maxi) ^ maxmat.cpp:23:9: error: 'fout' was not declared in this scope fout<<maxi<<" "<<cm<<endl ^ maxmat.cpp:24:5: error: expected ';' before '}' token } ^ maxmat.cpp:25:9: error: 'std::ifstream' has no member named 'closed' fin.closed(); ^ maxmat.cpp:26:5: error: 'fout' was not declared in this scope fout.closed(); ^
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ă.