#438
ComponenteConexe
Se dă lista muchiilor unui graf neorientat. Să se afișeze componentele conexe ale acestui graf.
Problema | ComponenteConexe | Operații I/O |
componenteconexe.in /componenteconexe.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20881828 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 725 B |
Data încărcării | 13 Februarie 2020, 10:08 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp: In function 'void df(int)': componenteconexe.cpp:6:1: error: 'viz' was not declared in this scope viz[x]=1; ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:11:1: error: expected ',' or ';' before 'fstream' fstream g("componenteconexte.out",ios::out) ^ componenteconexe.cpp:15:9: error: 'x' was not declared in this scope {f>>x>>y; ^ componenteconexe.cpp:15:12: error: 'y' was not declared in this scope {f>>x>>y; ^ componenteconexe.cpp:18:1: error: 'nrc' was not declared in this scope nrc=1; ^ componenteconexe.cpp:20:26: error: 'viz' was not declared in this scope for(i=1;i<=n;i++) if(viz[i]==0){nrc=nrc+1; ^ componenteconexe.cpp:22:4: error: 'g' was not declared in this scope g<<nrc<<endl; ^ componenteconexe.cpp:23:46: error: 'viz' was not declared in this scope for(i=1;i<=nrc;i++){for(j=1;j<=n;j++) if(viz[j]==i) ^ componenteconexe.cpp:27:34: error: expected '}' at end of input return 0;} ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe 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ă.