#4073
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 | #42847367 | Utilizator | |
Fișier | componenteconexe5.cpp | Dimensiune | 697 B |
Data încărcării | 20 Martie 2023, 09:42 | Scor / rezultat | Eroare de compilare |
componenteconexe5.cpp:1:1: error: 'include' does not name a type include <bits/stdc++.h> ^ componenteconexe5.cpp: In function 'void citire()': componenteconexe5.cpp:8:5: error: 'ifstream' was not declared in this scope ifstream f("componenteconexe5.in"); ^ componenteconexe5.cpp:8:14: error: expected ';' before 'f' ifstream f("componenteconexe5.in"); ^ componenteconexe5.cpp:9:5: error: 'f' was not declared in this scope f>>n>>m; ^ componenteconexe5.cpp: In function 'int main()': componenteconexe5.cpp:31:2: error: 'ofstream' was not declared in this scope ofstream g("componenteconexe5.out"); ^ componenteconexe5.cpp:31:11: error: expected ';' before 'g' ofstream g("componenteconexe5.out"); ^ componenteconexe5.cpp:38:11: error: 'g' was not declared in this scope g<<nr<<endl; ^ componenteconexe5.cpp:38:18: error: 'endl' was not declared in this scope g<<nr<<endl; ^
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ă.