#4073
ComponenteConexe5
Se dă lista muchiilor unui graf neorientat cu n
noduri și m
muchii și un șir de q
noduri. Să se determine pentru fiecare nod x
din șir numărul de noduri din componenta conexă din care face parte x
.
Problema | ComponenteConexe5 | Operații I/O |
![]() componenteconexe5.in /componenteconexe5.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58529322 | Utilizator | |
Fișier | componenteconexe5.cpp | Dimensiune | 849 B |
Data încărcării | 14 Iunie 2025, 18:45 | Scor / rezultat | Eroare de compilare |
componenteconexe5.cpp:38:1: error: stray '\302' in program return 0; ^ componenteconexe5.cpp:38:1: error: stray '\240' in program componenteconexe5.cpp:38:1: error: stray '\302' in program componenteconexe5.cpp:38:1: error: stray '\240' in program componenteconexe5.cpp:38:1: error: stray '\302' in program componenteconexe5.cpp:38:1: error: stray '\240' in program componenteconexe5.cpp:38:1: error: stray '\302' in program componenteconexe5.cpp:38:1: error: stray '\240' in program componenteconexe5.cpp:38:1: error: stray '\302' in program componenteconexe5.cpp:38:1: error: stray '\240' in program componenteconexe5.cpp:3:11: error: variable 'std::ifstream f' has initializer but incomplete type ifstream f("componenteconexe5.in"); ^ componenteconexe5.cpp:4:11: error: variable 'std::ofstream g' has initializer but incomplete type ofstream g("componenteconexe5.out"); ^ componenteconexe5.cpp:8:1: error: 'vector' does not name a type vector<int> adj[1005]; ^ componenteconexe5.cpp: In function 'void dfs(int, int)': componenteconexe5.cpp:13:19: error: 'adj' was not declared in this scope for (auto u : adj[nod]) ^ componenteconexe5.cpp: In function 'int main()': componenteconexe5.cpp:25:17: error: 'adj' was not declared in this scope adj[i].push_back(j); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe5 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ă.