#778
Se dă o matrice cu n linii şi m coloane şi elemente numere naturale. Să se determine mulțimea formată din elementele distincte ale chenarului matricei.
| Problema | MChenar | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64754390 | Utilizator | |
| Fișier | mchenar.cpp | Dimensiune | 477 B |
| Data încărcării | 28 Mai 2026, 00:58 | Scor/rezultat | 100 puncte |
mchenar.cpp: In function ‘int main()’: mchenar.cpp:10:33: warning: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Wdeprecated] 10 | for(j=1;j<=m;j++)fre[v[1][j]]++; | ~~~~~~~~~~~^ mchenar.cpp:11:33: warning: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Wdeprecated] 11 | for(i=1;i<=n;i++)fre[v[i][1]]++; | ~~~~~~~~~~~^ mchenar.cpp:12:33: warning: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Wdeprecated] 12 | for(j=1;j<=m;j++)fre[v[n][j]]++; | ~~~~~~~~~~~^ mchenar.cpp:13:33: warning: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Wdeprecated] 13 | for(i=1;i<=n;i++)fre[v[i][m]]++; | ~~~~~~~~~~~^ mchenar.cpp:6:13: warning: unused variable ‘x’ [-Wunused-variable] 6 | int n,m,x,y,i,j,z; | ^ mchenar.cpp:6:15: warning: unused variable ‘y’ [-Wunused-variable] 6 | int n,m,x,y,i,j,z; | ^ mchenar.cpp:6:21: warning: unused variable ‘z’ [-Wunused-variable] 6 | int n,m,x,y,i,j,z; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.005 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.006 secunde | OK. | 40 | 40 | ||
| 3 | 0.004 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MChenar 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ă.