#537
ComponenteConexe2
Se dă lista muchiilor unui graf neorientat. Să se determine numărul de muchii care pot fi eliminate din graf astfel încât numărul de componente conexe ale grafului să nu se modifice.
Problema | ComponenteConexe2 | Operații I/O |
componenteconexe2.in /componenteconexe2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50610558 | Utilizator | |
Fișier | componenteconexe2.cpp | Dimensiune | 889 B |
Data încărcării | 17 Aprilie 2024, 09:30 | Scor / rezultat | Eroare de compilare |
componenteconexe2.cpp:7:1: error: 'inbt' does not name a type inbt n, a[101][101], viz[101]; ^ componenteconexe2.cpp: In function 'void dfs(int)': componenteconexe2.cpp:11:5: error: 'viz' was not declared in this scope viz[start]=1; ^ componenteconexe2.cpp:12:22: error: 'n' was not declared in this scope for (int i=1; i<=n; i++) ^ componenteconexe2.cpp:14:26: error: 'a' was not declared in this scope if (viz[i]==0 && a[start][i]==1) ^ componenteconexe2.cpp: In function 'int main()': componenteconexe2.cpp:26:10: error: 'n' was not declared in this scope fin>>n; ^ componenteconexe2.cpp:29:9: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ componenteconexe2.cpp:34:13: error: 'viz' was not declared in this scope if (viz[i]==0) ^ componenteconexe2.cpp:44:17: error: 'a' was not declared in this scope if (a[i][j]==1) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe2 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ă.