#583
Tare conexitate
Se dă un graf orientat cu n
noduri. Să se determine câte componente tare conexe are graful dat.
Problema | Tare conexitate | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20438189 | Utilizator | |
Fișier | tare_conexitate.cpp | Dimensiune | 1.18 KB |
Data încărcării | 30 Ianuarie 2020, 12:02 | Scor / rezultat | Eroare de compilare |
tare_conexitate.cpp: In function 'void citire()': tare_conexitate.cpp:6:10: error: 'n' was not declared in this scope cin>>n>>m; ^ tare_conexitate.cpp:6:13: error: 'm' was not declared in this scope cin>>n>>m; ^ tare_conexitate.cpp:10:9: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; } ^ tare_conexitate.cpp: In function 'void RW(int (*)[1001], int)': tare_conexitate.cpp:18:21: warning: statement has no effect [-Wunused-value] a[i][j]==a[i][k]*a[k][j]; ^ tare_conexitate.cpp: In function 'void suprapunere()': tare_conexitate.cpp:22:21: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ tare_conexitate.cpp:24:19: error: 'a' was not declared in this scope b[i][j]=a[i][j]*t[i][j]; ^ tare_conexitate.cpp: In function 'void parcurgerelatime(int)': tare_conexitate.cpp:34:25: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ tare_conexitate.cpp: In function 'bool conex()': tare_conexitate.cpp:45:16: error: 'n' was not declared in this scope return u==n; ^ tare_conexitate.cpp: In function 'bool copiem()': tare_conexitate.cpp:49:21: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ tare_conexitate.cpp:51:21: error: 'a' was not declared in this scope b[i][j]=a[i][j]; ^ tare_conexitate.cpp:52:2: warning: no return statement in function returning non-void [-Wreturn-type] } ^ tare_conexitate.cpp: In function 'int main()': tare_conexitate.cpp:56:21: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ tare_conexitate.cpp: In function 'bool conex()': tare_conexitate.cpp:46:2: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Tare conexitate 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ă.