#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 | #54390400 | Utilizator | |
Fișier | tare_conexitate.cpp | Dimensiune | 1.45 KB |
Data încărcării | 27 Noiembrie 2024, 12:00 | Scor / rezultat | Eroare de compilare |
tare_conexitate.cpp:8:22: error: invalid use of non-static data member 'solve2::nmax' const int nmax = 101; ^ tare_conexitate.cpp:10:12: error: from this location int ad[nmax][nmax] = {{0}}; ^ tare_conexitate.cpp:8:22: error: invalid use of non-static data member 'solve2::nmax' const int nmax = 101; ^ tare_conexitate.cpp:10:18: error: from this location int ad[nmax][nmax] = {{0}}; ^ tare_conexitate.cpp:8:22: error: invalid use of non-static data member 'solve2::nmax' const int nmax = 101; ^ tare_conexitate.cpp:11:11: error: from this location int a[nmax] = {0},b[nmax] = {0},c[nmax] = {0}; ^ tare_conexitate.cpp:8:22: error: invalid use of non-static data member 'solve2::nmax' const int nmax = 101; ^ tare_conexitate.cpp:11:25: error: from this location int a[nmax] = {0},b[nmax] = {0},c[nmax] = {0}; ^ tare_conexitate.cpp:8:22: error: invalid use of non-static data member 'solve2::nmax' const int nmax = 101; ^ tare_conexitate.cpp:11:39: error: from this location int a[nmax] = {0},b[nmax] = {0},c[nmax] = {0}; ^ tare_conexitate.cpp: In member function 'void solve2::dfs1(int)': tare_conexitate.cpp:13:9: error: 'a' was not declared in this scope a[x] = 1; ^ tare_conexitate.cpp:15:27: error: 'ad' was not declared in this scope if (!a[y] and ad[x][y]) { ^ tare_conexitate.cpp: In member function 'void solve2::dfs2(int)': tare_conexitate.cpp:21:9: error: 'b' was not declared in this scope b[x] = 1; ^ tare_conexitate.cpp:23:27: error: 'ad' was not declared in this scope if (!b[y] and ad[y][x]) { ^ tare_conexitate.cpp: In member function 'void solve2::solve()': tare_conexitate.cpp:33:13: error: 'ad' was not declared in this scope ad[x][y] = 1; ^ tare_conexitate.cpp:36:18: error: 'c' was not declared in this scope if (!c[i]) { ^ tare_conexitate.cpp:38:21: error: 'a' was not declared in this scope a[j] = b[j] = 0; ^ tare_conexitate.cpp:38:28: error: 'b' was not declared in this scope a[j] = b[j] = 0; ^ tare_conexitate.cpp:44:25: error: 'a' was not declared in this scope if (a[j] and b[j]) { ^ tare_conexitate.cpp:44:34: error: 'b' was not declared in this scope if (a[j] and b[j]) { ^
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ă.