#1603
Se dă lista muchiilor unui graf neorientat. Pentru fiecare componentă conexă numim cel mai mic vârf de ea reprezentant al componentei conexe. Determinați reprezentantul componentei conexe cu cele mai multe vârfuri și câte noduri conține aceasta.
| Problema | ComponenteConexe3 | Operații I/O |
componenteconexe3.in/componenteconexe3.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64935838 | Utilizator | |
| Fișier | componenteconexe3.cpp | Dimensiune | 1.02 KB |
| Data încărcării | 16 Iunie 2026, 21:55 | Scor/rezultat | Eroare de compilare |
componenteconexe3.cpp:8:9: error: ‘v’ does not name a type 8 | v[105]; | ^ componenteconexe3.cpp:10:9: error: ‘nrm’ does not name a type 10 | nrm[105]; | ^~~ componenteconexe3.cpp: In function ‘void bf(int, int)’: componenteconexe3.cpp:15:9: error: ‘v’ was not declared in this scope 15 | v[varf] = nrc; | ^ componenteconexe3.cpp: In function ‘int main()’: componenteconexe3.cpp:41:20: error: ‘v’ was not declared in this scope 41 | if(v[i] == 0 ) | ^ componenteconexe3.cpp:48:21: error: ‘v’ was not declared in this scope 48 | nrv[v[i]] ++; | ^ componenteconexe3.cpp:57:12: error: ‘v’ was not declared in this scope 57 | if(v[i] == CC) | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe3 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ă.