#784
Se dă o matrice cu n linii şi n coloane şi elemente numere naturale. Să se determine câte elemente ale matricei se află pe linii și coloane de sumă egală.
| Problema | LinColEgale | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64809461 | Utilizator | |
| Fișier | lincolegale.cpp | Dimensiune | 593 B |
| Data încărcării | 02 Iunie 2026, 18:36 | Scor/rezultat | 100 puncte |
lincolegale.cpp: In function ‘int main()’: lincolegale.cpp:8:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 8 | for (int i=1;i<=n;i++) | ^~~ lincolegale.cpp:11:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for (int i=1;i<=n;i++) | ^~~ lincolegale.cpp:13:8: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 13 | for (int j=1;j<=n;j++) | ^~~ lincolegale.cpp:15:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | a[i][0]=s; | ^ lincolegale.cpp:20:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 20 | for (int i=1;i<=n;i++) | ^~~ lincolegale.cpp:22:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 22 | a[0][j]=s; | ^ lincolegale.cpp:6:11: warning: unused variable ‘m’ [-Wunused-variable] 6 | int n,m,a[105][105],s=0,k=0; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.002 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LinColEgale 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ă.