#4154
Se dă un graf orientat cu n noduri. Să se determine câte componente tare conexe ale grafului sunt formate dintr-un singur nod.
| Problema | ComponenteTC | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63910107 | Utilizator | |
| Fișier | componentetc.cpp | Dimensiune | 1.78 KB |
| Data încărcării | 26 Martie 2026, 00:40 | Scor/rezultat | Eroare de compilare |
componentetc.cpp:53:5: error: redefinition of 'int n' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:5: error: 'int n' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:7: error: redefinition of 'int m' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:7: error: 'int m' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:19: error: redefinition of 'int a [101][101]' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:9: error: 'int a [101][101]' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:21: error: redefinition of 'int cnt' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:21: error: 'int cnt' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:32: error: redefinition of 'int ctc [101]' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:25: error: 'int ctc [101]' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:39: error: redefinition of 'int f [101]' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:34: error: 'int f [101]' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:46: error: redefinition of 'int s [101]' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:41: error: 'int s [101]' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:53: error: redefinition of 'int p [101]' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:48: error: 'int p [101]' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:55: error: redefinition of 'int k' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:55: error: 'int k' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:57: error: redefinition of 'int x' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:57: error: 'int x' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp:53:61: error: redefinition of 'int y' int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,b,y; ^ componentetc.cpp:3:59: error: 'int y' previously declared here int n,m,a[101][101],cnt,ctc[101],f[101],s[101],p[101],k,x,y; ^ componentetc.cpp: In function 'void DFS1(int)': componentetc.cpp:54:6: error: redefinition of 'void DFS1(int)' void DFS1(int x) ^ componentetc.cpp:4:6: error: 'void DFS1(int)' previously defined here void DFS1(int x) ^ componentetc.cpp: In function 'void DFS2(int)': componentetc.cpp:61:6: error: redefinition of 'void DFS2(int)' void DFS2(int x) ^ componentetc.cpp:11:6: error: 'void DFS2(int)' previously defined here void DFS2(int x) ^ componentetc.cpp: In function 'int main()': componentetc.cpp:68:5: error: redefinition of 'int main()' int main() ^ componentetc.cpp:18:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteTC 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ă.