#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 | #64553951 | Utilizator | |
| Fișier | sumcolmax.cpp | Dimensiune | 544 B |
| Data încărcării | 14 Mai 2026, 08:49 | Scor/rezultat | Eroare de compilare |
sumcolmax.cpp: In function ‘int main()’: sumcolmax.cpp:7:25: error: ‘INT_MIN’ was not declared in this scope 7 | int a[11][11],n,m,smax=INT_MIN,s=0,k=0; | ^~~~~~~ sumcolmax.cpp:3:1: note: ‘INT_MIN’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’? 2 | #include <fstream> +++ |+#include <climits> 3 | using namespace std; sumcolmax.cpp:11:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(int i=1;i<=n;i++) | ^~~ sumcolmax.cpp:16:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | for(int j=1;j<=m;j++){ | ^~~ sumcolmax.cpp:17:13: error: ‘s’ was not declared in this scope 17 | s=0; | ^ sumcolmax.cpp:18:11: error: ‘k’ was not declared in this scope 18 | k=0; | ^ sumcolmax.cpp:32:20: error: ‘k’ was not declared in this scope 32 | fout<<a[i][k]<<" "; | ^
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ă.