#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 | #64580956 | Utilizator | |
| Fișier | mchenar.cpp | Dimensiune | 865 B |
| Data încărcării | 15 Mai 2026, 20:15 | Scor/rezultat | 0 puncte |
mchenar.cpp: In function ‘int main()’: mchenar.cpp:35:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 35 | for (int i = 0; i < n; i++) | ^~~ mchenar.cpp:38:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 38 | std::set<int>::iterator itr; | ^~~ mchenar.cpp:41:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 41 | for (itr = mult.begin(); itr != mult.end(); itr++) | ^~~ mchenar.cpp:44:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 44 | return 0; | ^~~~~~ mchenar.cpp:17:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%d%d", &n, &m); | ~~~~~^~~~~~~~~~~~~~~~ mchenar.cpp:22:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 22 | scanf("%d", &mat[i][j]); | ~~~~~^~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 40 | 0 | ||
| Punctaj total | 0 | |||||
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ă.