#441
ComponenteConexe1
Se dă lista muchiilor unui graf neorientat. Să se determine numărul minim de muchii care trebuie adăugate pentru ca graful să devină conex, precum și un set de asemenea muchii.
Problema | ComponenteConexe1 | Operații I/O |
componenteconexe1.in /componenteconexe1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #29639052 | Utilizator | |
Fișier | componenteconexe1.cpp | Dimensiune | 604 B |
Data încărcării | 13 Mai 2021, 11:40 | Scor / rezultat | Eroare de compilare |
componenteconexe1.cpp:6:20: error: two or more data types in declaration of 'dfs' void dfs (int k) ^ componenteconexe1.cpp: In function 'void detc()': componenteconexe1.cpp:16:10: error: 'i' was not declared in this scope for (i=1; i<=n, i++) ^ componenteconexe1.cpp:16:18: error: 'n' was not declared in this scope for (i=1; i<=n, i++) ^ componenteconexe1.cpp:16:24: error: expected ';' before ')' token for (i=1; i<=n, i++) ^ componenteconexe1.cpp:17:13: error: 'viz' was not declared in this scope if (viz[i]==0) ^ componenteconexe1.cpp:19:9: error: 'nc' was not declared in this scope nc++; ^ componenteconexe1.cpp:20:14: error: 'dfs' was not declared in this scope dfs(i); ^ componenteconexe1.cpp:21:9: error: 'v' was not declared in this scope v[nc]=i; ^ componenteconexe1.cpp: In function 'int main()': componenteconexe1.cpp:26:10: error: 'n' was not declared in this scope cin>>n; ^ componenteconexe1.cpp:27:17: error: 'x' was not declared in this scope while (cin>>x>>y) ^ componenteconexe1.cpp:27:20: error: 'y' was not declared in this scope while (cin>>x>>y) ^ componenteconexe1.cpp:28:9: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ componenteconexe1.cpp:30:11: error: 'nc' was not declared in this scope cout<<nc-1<<endl; ^ componenteconexe1.cpp:31:10: error: 'i' was not declared in this scope for (i=1; i<=n; i++) ^ componenteconexe1.cpp:32:9: error: 'cou5t' was not declared in this scope cou5t<<v[i]<<" "<<v[i+1]<<endl; ^ componenteconexe1.cpp:32:16: error: 'v' was not declared in this scope cou5t<<v[i]<<" "<<v[i+1]<<endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe1 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ă.