#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 | #64776423 | Utilizator | |
| Fișier | mchenar.cpp | Dimensiune | 435 B |
| Data încărcării | 29 Mai 2026, 16:08 | Scor/rezultat | Eroare de compilare |
mchenar.cpp: In function ‘int main()’: mchenar.cpp:13:5: error: ‘y’ was not declared in this scope 13 | y=a[n][j]; | ^ mchenar.cpp:17:15: error: expected ‘;’ before ‘y’ 17 | x=a[i][1] | ^ | ; 18 | y=a[i][m]; | ~ mchenar.cpp:20:8: error: ‘y’ was not declared in this scope 20 | v[y]++; | ^ mchenar.cpp:23:9: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 23 | if(v[i]>0 cout<<i<<" "; | ^ mchenar.cpp:23:15: error: expected ‘;’ before ‘cout’ 23 | if(v[i]>0 cout<<i<<" "; | ^~~~~ | ; mchenar.cpp:23:13: warning: statement has no effect [-Wunused-value] 23 | if(v[i]>0 cout<<i<<" "; | ~~~~^~ mchenar.cpp:24:9: error: expected primary-expression before ‘}’ token 24 | } | ^ mchenar.cpp:23:29: error: expected ‘)’ before ‘}’ token 23 | if(v[i]>0 cout<<i<<" "; | ~ ^ | ) 24 | } | ~ mchenar.cpp:24:9: error: expected primary-expression before ‘}’ token 24 | } | ^
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ă.