#1395
Se dau două matrice cu elemente numere întregi. Calculați suma lor.
| Problema | MSuma | Operații I/O |
msuma.in/msuma.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64493719 | Utilizator | |
| Fișier | msuma.cpp | Dimensiune | 552 B |
| Data încărcării | 11 Mai 2026, 09:47 | Scor/rezultat | Eroare de compilare |
msuma.cpp:4:20: error: expected ‘;’ before ‘ifstream’ 4 | using namespace std | ^ | ; 5 | ifstream cin(msuma.in) | ~~~~~~~~ msuma.cpp:5:14: error: ‘msuma’ was not declared in this scope 5 | ifstream cin(msuma.in) | ^~~~~ msuma.cpp:6:1: error: expected ‘,’ or ‘;’ before ‘ofstream’ 6 | ofstream cout(msuma.out) | ^~~~~~~~ msuma.cpp:8:17: error: declaration of ‘A’ as multidimensional array must have bounds for all dimensions except the first 8 | void citire(int A[][]; int n; int m) | ^ msuma.cpp:8:22: error: expected ‘)’ before ‘;’ token 8 | void citire(int A[][]; int n; int m) | ~ ^ | ) msuma.cpp:8:36: error: expected initializer before ‘)’ token 8 | void citire(int A[][]; int n; int m) | ^ msuma.cpp:9:17: error: ‘i’ does not name a type 9 | for(int i=1;i<=n;i++) | ^ msuma.cpp:9:22: error: ‘i’ does not name a type 9 | for(int i=1;i<=n;i++) | ^ msuma.cpp:10:20: error: ‘j’ does not name a type 10 | for (int j;j<=m;j++) | ^ msuma.cpp:10:25: error: ‘j’ does not name a type 10 | for (int j;j<=m;j++) | ^ msuma.cpp: In function ‘int main()’: msuma.cpp:13:13: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 13 | { cin>>n>>m>>p>>q; | ^ | tm msuma.cpp:13:16: error: ‘p’ was not declared in this scope 13 | { cin>>n>>m>>p>>q; | ^ msuma.cpp:13:19: error: ‘q’ was not declared in this scope 13 | { cin>>n>>m>>p>>q; | ^ msuma.cpp:14:12: error: ‘A’ was not declared in this scope 14 | citire(A,n,m) | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MSuma 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ă.