#3903
Se dă o matrice A, formată din N linii și N coloane. Asupra unei submatrice cu colțul din stânga-sus aflat pe linia l1 și coloana c1, și colțul din dreapta-jos aflat pe linia l2 și coloana c2, se poate efectua operație de mărire a elementelor cu un număr întreg v. Afișați matricea A, după efectuarea a Q astfel de operații.
ad-hoc
| Problema | Diff2dArrays | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.4 secunde | Limita memorie |
Total: 4 MB
/
Stivă 2 MB
|
| Id soluție | #64137357 | Utilizator | |
| Fișier | diff2darrays.cpp | Dimensiune | 451 B |
| Data încărcării | 20 Aprilie 2026, 08:33 | Scor/rezultat | 0 puncte |
diff2darrays.cpp: In function ‘int main()’: diff2darrays.cpp:8:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 8 | for(i=1;i<=N;i++) | ^~~ diff2darrays.cpp:11:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | cin>>Q; | ^~~ diff2darrays.cpp:15:13: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 15 | for(j=c1;j<=c2;j++) | ^~~ diff2darrays.cpp:16:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | A[i][j]+=v; Q--;} | ^ diff2darrays.cpp:17:24: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for(i=1;i<=N;i++){ for(j=1;j<=N;j++) | ^~~ diff2darrays.cpp:18:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | cout<<A[i][j]<<" "; cout<<endl;} | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 5 | 0 | ||
| 3 | 0.331 secunde | Raspuns gresit. | 5 | 0 | ||
| 4 | Depășit | Limita de timp depășită | 5 | 0 | ||
| 5 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 6 | 0.162 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 8 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 9 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 10 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 11 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 12 | Depășit | Limita de timp depășită | 10 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Diff2dArrays 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ă.