#3420
Se dă un graf orientat cu n vârfuri și m arce prin lista arcelor. Se numește arc inutil un arc cu proprietatea că are extremitățile în componente tare conexe diferite. Afișați numărul de arce inutile și care sunt acestea.
Problema | arce_inutile | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57117639 | Utilizator | |
Fișier | arce_inutile.cpp | Dimensiune | 3.23 KB |
Data încărcării | 17 Martie 2025, 11:53 | Scor / rezultat | Eroare de compilare |
arce_inutile.cpp: In function 'void dfs1(int)': arce_inutile.cpp:10:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ arce_inutile.cpp: In function 'void dfs2(int)': arce_inutile.cpp:21:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ arce_inutile.cpp: In function 'void dfs3(int)': arce_inutile.cpp:33:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ arce_inutile.cpp: At global scope: arce_inutile.cpp:89:21: error: redefinition of 'std::vector<int> Mt [105]' }vector <int> Mt[105]; ^ arce_inutile.cpp:4:14: error: 'std::vector<int> Mt [105]' previously declared here vector <int> Mt[105]; ^ arce_inutile.cpp:90:14: error: redefinition of 'std::vector<int> ksr' vector <int> ksr; ^ arce_inutile.cpp:5:14: error: 'std::vector<int> ksr' previously declared here vector <int> ksr; ^ arce_inutile.cpp:91:32: error: redefinition of 'std::vector<int>::reverse_iterator it' vector <int>::reverse_iterator it; ^ arce_inutile.cpp:6:32: error: 'std::vector<int>::reverse_iterator it' previously declared here vector <int>::reverse_iterator it; ^ arce_inutile.cpp:92:5: error: redefinition of 'int n' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:5: error: 'int n' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:8: error: redefinition of 'int m' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:8: error: 'int m' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:19: error: redefinition of 'int fv1 [105]' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:12: error: 'int fv1 [105]' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:29: error: redefinition of 'int fv2 [105]' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:22: error: 'int fv2 [105]' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:32: error: redefinition of 'int i' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:32: error: 'int i' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:35: error: redefinition of 'int a' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:35: error: 'int a' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:38: error: redefinition of 'int nrk' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:38: error: 'int nrk' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:43: error: redefinition of 'int b' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:43: error: 'int b' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:54: error: redefinition of 'int comp [105]' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:46: error: 'int comp [105]' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:57: error: redefinition of 'int componenta' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:57: error: 'int componenta' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:76: error: redefinition of 'int fv3 [105]' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:69: error: 'int fv3 [105]' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:79: error: redefinition of 'int inutile' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:79: error: 'int inutile' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:98: error: redefinition of 'int istart [105]' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:88: error: 'int istart [105]' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:92:111: error: redefinition of 'int ifinal [105]' int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp:7:101: error: 'int ifinal [105]' previously declared here int n, m, fv1[105], fv2[105], i, a, nrk, b, comp[105], componenta, fv3[105], inutile, istart[105], ifinal[105]; ^ arce_inutile.cpp: In function 'void dfs1(int)': arce_inutile.cpp:93:6: error: redefinition of 'void dfs1(int)' void dfs1(int start) ^ arce_inutile.cpp:8:6: error: 'void dfs1(int)' previously defined here void dfs1(int start) ^ arce_inutile.cpp:95:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ arce_inutile.cpp: In function 'void dfs2(int)': arce_inutile.cpp:104:6: error: redefinition of 'void dfs2(int)' void dfs2(int start) ^ arce_inutile.cpp:19:6: error: 'void dfs2(int)' previously defined here void dfs2(int start) ^ arce_inutile.cpp:106:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ arce_inutile.cpp: In function 'void dfs3(int)': arce_inutile.cpp:116:6: error: redefinition of 'void dfs3(int)' void dfs3(int start) ^ arce_inutile.cpp:31:6: error: 'void dfs3(int)' previously defined here void dfs3(int start) ^ arce_inutile.cpp:118:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ arce_inutile.cpp: In function 'int main()': arce_inutile.cpp:136:5: error: redefinition of 'int main()' int main() ^ arce_inutile.cpp:51:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema arce_inutile 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ă.