#1603
ComponenteConexe3
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 | #48537692 | Utilizator | |
Fișier | componenteconexe3.cpp | Dimensiune | 871 B |
Data încărcării | 29 Ianuarie 2024, 09:49 | Scor / rezultat | Eroare de compilare |
componenteconexe3.cpp:5:15: warning: missing terminating " character [enabled by default] ofstream cout("componenteconexe3.out ^ componenteconexe3.cpp:5:1: error: missing terminating " character ofstream cout("componenteconexe3.out ^ componenteconexe3.cpp:6:15: warning: missing terminating " character [enabled by default] "); ^ componenteconexe3.cpp:6:15: error: missing terminating " character componenteconexe3.cpp:8:7: error: 'm' has not been declared int n,m,viz[101],fr[101],p; ^ componenteconexe3.cpp:8:9: error: 'viz' has not been declared int n,m,viz[101],fr[101],p; ^ componenteconexe3.cpp:8:18: error: 'fr' has not been declared int n,m,viz[101],fr[101],p; ^ componenteconexe3.cpp:8:26: error: 'p' has not been declared int n,m,viz[101],fr[101],p; ^ componenteconexe3.cpp:8:27: error: expected ')' before ';' token int n,m,viz[101],fr[101],p; ^ componenteconexe3.cpp: In function 'void DF(int)': componenteconexe3.cpp:13:5: error: 'viz' was not declared in this scope viz[x]=p; ^ componenteconexe3.cpp:13:12: error: 'p' was not declared in this scope viz[x]=p; ^ componenteconexe3.cpp:14:5: error: 'fr' was not declared in this scope fr[p]++; ^ componenteconexe3.cpp:15:21: error: 'n' was not declared in this scope for(int i=1; i<=n; i++) ^ componenteconexe3.cpp: In function 'int main()': componenteconexe3.cpp:22:10: error: 'n' was not declared in this scope cin>>n; ^ componenteconexe3.cpp:23:5: error: 'm' was not declared in this scope m=0; ^ componenteconexe3.cpp:24:5: error: 'p' was not declared in this scope p=0; ^ componenteconexe3.cpp:33:12: error: 'viz' was not declared in this scope if(viz[i]==0) ^ componenteconexe3.cpp:40:12: error: 'fr' was not declared in this scope if(fr[i]>fr[nrcomp]) ^ componenteconexe3.cpp:43:12: error: 'viz' was not declared in this scope if(viz[i]==nrcomp) ^ componenteconexe3.cpp:45:19: error: invalid operands of types 'std::ofstream(int, int, int*, int*, int) {aka std::basic_ofstream<char>(int, int, int*, int*, int)}' and 'int' to binary 'operator<<' cout<<i<<' '<<fr[nrcomp]<<endl; ^ componenteconexe3.cpp:45:27: error: 'fr' was not declared in this scope cout<<i<<' '<<fr[nrcomp]<<endl; ^
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ă.