#2282
Se consideră un graf neorientat cu n vârfuri și m muchii. Cele m muchii se elimină pe rând din graf. Pentru fiecare muchie eliminată trebuie să spuneți câte componente conexe are graful.
| Problema | ComponenteConexe4 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64816722 | Utilizator | |
| Fișier | componenteconexe4.cpp | Dimensiune | 1.30 KB |
| Data încărcării | 03 Iunie 2026, 11:37 | Scor/rezultat | 100 puncte |
componenteconexe4.cpp: In function ‘int main()’: componenteconexe4.cpp:58:10: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 58 | auto [x,y] = S.top(); | ^ componenteconexe4.cpp:61:18: warning: comparison of integer expressions of different signedness: ‘std::stack<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 61 | if(S2.size() < m){ | ~~~~~~~~~~^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.001 secunde | OK. | 10 | 10 | ||
| 1 | 0.003 secunde | OK. | 10 | 10 | ||
| 2 | 0.002 secunde | OK. | 10 | 10 | ||
| 3 | 0.014 secunde | OK. | 10 | 10 | ||
| 4 | 0.065 secunde | OK. | 10 | 10 | ||
| 5 | 0.07 secunde | OK. | 10 | 10 | ||
| 6 | 0.132 secunde | OK. | 10 | 10 | ||
| 7 | 0.389 secunde | OK. | 10 | 10 | ||
| 8 | 0.552 secunde | OK. | 10 | 10 | ||
| 9 | 0.642 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe4 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ă.