#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 | #64493659 | Utilizator | |
| Fișier | msuma.cpp | Dimensiune | 654 B |
| Data încărcării | 11 Mai 2026, 09:46 | Scor/rezultat | Eroare de compilare |
msuma.cpp: In function ‘int main()’: msuma.cpp:9:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(int i=1; i<=n1;++i) | ^~~ msuma.cpp:12:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | cin>>n2>>m2; | ^~~ msuma.cpp:13:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 13 | for(int i=1; i<=n1; ++i) | ^~~ msuma.cpp:16:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | if(n1=n1 || m1==m2){ | ^~ msuma.cpp:16:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 16 | if(n1=n1 || m1==m2){ | ~~^~~~~~~~~~~~~ msuma.cpp:21:20: error: ‘j’ was not declared in this scope 21 | cout<<S[i][j]<<' '; | ^ msuma.cpp: At global scope: msuma.cpp:26:5: error: expected unqualified-id before ‘return’ 26 | return 0; | ^~~~~~ msuma.cpp:27:1: error: expected declaration before ‘}’ token 27 | } | ^
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ă.