#583
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 | #61260549 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 775 B |
| Data încărcării | 22 Noiembrie 2025, 16:20 | Scor/rezultat | Eroare de compilare |
tare_conexitate.cpp: In function 'void df1(int)': tare_conexitate.cpp:3:5: error: 's' was not declared in this scope s[x] = 1; ^ tare_conexitate.cpp:4:25: error: 'n' was not declared in this scope for(int i =1 ; i <= n ; i ++) ^ tare_conexitate.cpp:5:25: error: 'a' was not declared in this scope if(s[i] == 0 && a[x][i] == 1) ^ tare_conexitate.cpp: In function 'void df2(int)': tare_conexitate.cpp:11:5: error: 'p' was not declared in this scope p[x] = 1; ^ tare_conexitate.cpp:12:25: error: 'n' was not declared in this scope for(int i =1 ; i <= n ; i ++) ^ tare_conexitate.cpp:13:25: error: 'a' was not declared in this scope if(p[i] == 0 && a[i][x] == 1) ^ tare_conexitate.cpp: In function 'int main()': tare_conexitate.cpp:20:5: error: 'cin' was not declared in this scope cin>>n>>m; ^ tare_conexitate.cpp:25:9: error: 'a' was not declared in this scope a[i][j]=1; ^ tare_conexitate.cpp:28:12: error: 'ctc' was not declared in this scope if(ctc[i] == 0) ^ tare_conexitate.cpp:31:17: error: 's' was not declared in this scope s[j] = p[j] = 0; ^ tare_conexitate.cpp:31:24: error: 'p' was not declared in this scope s[j] = p[j] = 0; ^ tare_conexitate.cpp:32:13: error: 'nrc' was not declared in this scope nrc ++; ^ tare_conexitate.cpp:35:20: error: 's' was not declared in this scope if(s[j] == 1 && p[j] == 1) ^ tare_conexitate.cpp:35:33: error: 'p' was not declared in this scope if(s[j] == 1 && p[j] == 1) ^ tare_conexitate.cpp:38:5: error: 'cout' was not declared in this scope cout<<nrc; ^ tare_conexitate.cpp:38:11: error: 'nrc' was not declared in this scope cout<<nrc; ^
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ă.