#658
SumaLinii
Se dă o matrice cu n
linii și m
coloane și elemente numere naturale. Să se determine suma elementelor de pe fiecare linie.
Problema | SumaLinii | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51614442 | Utilizator | |
Fișier | sumalinii.cpp | Dimensiune | 296 B |
Data încărcării | 21 Iulie 2024, 20:12 | Scor / rezultat | Eroare de compilare |
sumalinii.cpp: In function 'int main()': sumalinii.cpp:4:33: error: size of array 'mat' is too large { int n,m,mat[1000000][1000000]; ^ sumalinii.cpp:6:10: error: expected ';' before '==' token for(int i==1;i<=n;i++) ^ sumalinii.cpp:6:10: error: expected primary-expression before '==' token sumalinii.cpp:6:15: warning: for increment expression has no effect [-Wunused-value] for(int i==1;i<=n;i++) ^ sumalinii.cpp:6:18: error: expected ')' before ';' token for(int i==1;i<=n;i++) ^ sumalinii.cpp:6:19: error: 'i' was not declared in this scope for(int i==1;i<=n;i++) ^ sumalinii.cpp:6:22: error: expected ';' before ')' token for(int i==1;i<=n;i++) ^ sumalinii.cpp:7:19: error: 'j' was not declared in this scope for (int j==1;j<=m;j++) ^ sumalinii.cpp:7:27: error: expected ';' before ')' token for (int j==1;j<=m;j++) ^ sumalinii.cpp:9:14: error: expected ';' before '==' token for(int i==1;i<=n;i++) ^ sumalinii.cpp:9:14: error: expected primary-expression before '==' token sumalinii.cpp:9:19: warning: for increment expression has no effect [-Wunused-value] for(int i==1;i<=n;i++) ^ sumalinii.cpp:9:22: error: expected ')' before ';' token for(int i==1;i<=n;i++) ^ sumalinii.cpp:9:26: error: expected ';' before ')' token for(int i==1;i<=n;i++) ^ sumalinii.cpp:11:11: error: expected ';' before '==' token {for(int j==1;j<=m;j++) ^ sumalinii.cpp:11:11: error: expected primary-expression before '==' token sumalinii.cpp:11:16: warning: for increment expression has no effect [-Wunused-value] {for(int j==1;j<=m;j++) ^ sumalinii.cpp:11:19: error: expected ')' before ';' token {for(int j==1;j<=m;j++) ^ sumalinii.cpp:11:23: error: expected ';' before ')' token {for(int j==1;j<=m;j++) ^ sumalinii.cpp:13:11: error: 's' was not declared in this scope cout<<s; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumaLinii 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ă.