#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 | #50695838 | Utilizator | |
Fișier | tare_conexitate.cpp | Dimensiune | 925 B |
Data încărcării | 22 Aprilie 2024, 09:10 | Scor / rezultat | Eroare de compilare |
tare_conexitate.cpp:5:2: error: 'vector' does not name a type vector<int> x; ^ tare_conexitate.cpp:6:2: error: 'vector' does not name a type vector<int> y; ^ tare_conexitate.cpp: In function 'void df1(int)': tare_conexitate.cpp:9:5: error: 's' was not declared in this scope s[x] = 1; ^ tare_conexitate.cpp:10:23: error: 'n' was not declared in this scope for (auto i : n) ^ tare_conexitate.cpp:11: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:17:5: error: 'p' was not declared in this scope p[x] = 1; ^ tare_conexitate.cpp:18:25: error: 'n' was not declared in this scope for(int i =1 ; i <= n ; i ++) ^ tare_conexitate.cpp:19: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:28:16: error: 'x' was not declared in this scope cin >> x >> y; ^ tare_conexitate.cpp:28:21: error: 'y' was not declared in this scope cin >> x >> y; ^ tare_conexitate.cpp:34:12: error: 'ctc' was not declared in this scope if(ctc[i] == 0) ^ tare_conexitate.cpp:37:17: error: 's' was not declared in this scope s[j] = p[j] = 0; ^ tare_conexitate.cpp:37:24: error: 'p' was not declared in this scope s[j] = p[j] = 0; ^ tare_conexitate.cpp:38:13: error: 'nrc' was not declared in this scope nrc ++; ^ tare_conexitate.cpp:41:20: error: 's' was not declared in this scope if(s[j] == 1 && p[j] == 1) ^ tare_conexitate.cpp:41:33: error: 'p' was not declared in this scope if(s[j] == 1 && p[j] == 1) ^
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ă.