#192
Să se afișeze elementele de pe coloana cu suma elementelor maximă într-o matrice.
Problema | SumColMax | Operații I/O |
![]() sumcolmax.in /sumcolmax.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58380847 | Utilizator | |
Fișier | sumcolmax.cpp | Dimensiune | 534 B |
Data încărcării | 30 Mai 2025, 13:25 | Scor / rezultat | Eroare de compilare |
sumcolmax.cpp:4:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("sumcolmax.in") ^ sumcolmax.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout("sumcolmax.out") ^ sumcolmax.cpp: In function 'int main()': sumcolmax.cpp:9:12: error: 'n' was not declared in this scope fin >> n >> m; ^ sumcolmax.cpp:9:17: error: 'm' was not declared in this scope fin >> n >> m; ^ sumcolmax.cpp:12:16: error: 'a' was not declared in this scope fin >> a[i][j]; ^ sumcolmax.cpp:14:9: error: 's' was not declared in this scope { s=0; ^ sumcolmax.cpp:16:16: error: 'a' was not declared in this scope s+=a[i][j]; ^ sumcolmax.cpp:17:14: error: 'sm' was not declared in this scope if(s>sm) ^ sumcolmax.cpp:20:13: error: 'poz' was not declared in this scope poz=j; ^ sumcolmax.cpp:24:9: error: 'fout' was not declared in this scope fout << a[i][poz] << " "; ^ sumcolmax.cpp:24:17: error: 'a' was not declared in this scope fout << a[i][poz] << " "; ^ sumcolmax.cpp:24:22: error: 'poz' was not declared in this scope fout << a[i][poz] << " "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumColMax 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ă.