#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 | #63639547 | Utilizator | |
| Fișier | tare_conexitate.cpp | Dimensiune | 722 B |
| Data încărcării | 12 Martie 2026, 11:17 | Scor/rezultat | Eroare de compilare |
tare_conexitate.cpp:3:21: warning: extra tokens at end of #include directive [enabled by default] #include <iostream> #define ReisenUInaba 101 ^ tare_conexitate.cpp:7:23: error: 'ReisenUInaba' was not declared in this scope int n, m, x, y; int s[ReisenUInaba], p[ReisenUInaba]; ^ tare_conexitate.cpp:7:40: error: 'ReisenUInaba' was not declared in this scope int n, m, x, y; int s[ReisenUInaba], p[ReisenUInaba]; ^ tare_conexitate.cpp:8:9: error: 'ReisenUInaba' was not declared in this scope int mat[ReisenUInaba][ReisenUInaba]; int ctc[ReisenUInaba]; ^ tare_conexitate.cpp:8:23: error: 'ReisenUInaba' was not declared in this scope int mat[ReisenUInaba][ReisenUInaba]; int ctc[ReisenUInaba]; ^ tare_conexitate.cpp:8:46: error: 'ReisenUInaba' was not declared in this scope int mat[ReisenUInaba][ReisenUInaba]; int ctc[ReisenUInaba]; ^ tare_conexitate.cpp: In function 'void DFSS(int)': tare_conexitate.cpp:10:20: error: 's' was not declared in this scope void DFSS(int k) { s[k]=1; ^ tare_conexitate.cpp:13:5: error: 'mat' was not declared in this scope if (mat[k][i] && s[i]==0) DFSS(i); ^ tare_conexitate.cpp: In function 'void DFSP(int)': tare_conexitate.cpp:17:20: error: 'p' was not declared in this scope void DFSP(int k) { p[k]=1; ^ tare_conexitate.cpp:20:5: error: 'mat' was not declared in this scope if (mat[i][k] && p[i]==0) ^ tare_conexitate.cpp: In function 'int main()': tare_conexitate.cpp:27:1: error: 'mat' was not declared in this scope mat[x][y]=1; } ^ tare_conexitate.cpp:31:7: error: 'ctc' was not declared in this scope { if (ctc[i]==0) { ^ tare_conexitate.cpp:34:3: error: 's' was not declared in this scope { s[j]=0; p[j]=0; } ^ tare_conexitate.cpp:34:11: error: 'p' was not declared in this scope { s[j]=0; p[j]=0; } ^ tare_conexitate.cpp:39:7: error: 's' was not declared in this scope { if (s[j]==1 && p[j]==1) ^ tare_conexitate.cpp:39:18: 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ă.