#438
ComponenteConexe
Se dă lista muchiilor unui graf neorientat. Să se afișeze componentele conexe ale acestui graf.
Problema | ComponenteConexe | Operații I/O |
componenteconexe.in /componenteconexe.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20427201 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 2.13 KB |
Data încărcării | 30 Ianuarie 2020, 08:19 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:43:11: error: redefinition of 'std::ifstream f' ifstream f("componenteconexe.in"); ^ componenteconexe.cpp:4:10: error: 'std::ifstream f' previously declared here ifstream f("componenteconexe.in"); ^ componenteconexe.cpp:44:11: error: redefinition of 'std::ofstream g' ofstream g("componenteconexe.out"); ^ componenteconexe.cpp:5:10: error: 'std::ofstream g' previously declared here ofstream g("componenteconexe.out"); ^ componenteconexe.cpp:45:15: error: redefinition of 'int a [101][101]' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:5: error: 'int a [101][101]' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:45:17: error: redefinition of 'int n' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:17: error: 'int n' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:45:19: error: redefinition of 'int i' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:19: error: 'int i' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:45:21: error: redefinition of 'int j' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:21: error: 'int j' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:45:28: error: redefinition of 'int v [101]' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:23: error: 'int v [101]' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:45:35: error: redefinition of 'int m [101]' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:30: error: 'int m [101]' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:45:37: error: redefinition of 'int l' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:37: error: 'int l' previously defined here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:45:41: error: redefinition of 'int nrc' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:41: error: 'int nrc' previously defined here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp: In function 'void dfs(int)': componenteconexe.cpp:46:6: error: redefinition of 'void dfs(int)' void dfs(int k) ^ componenteconexe.cpp:7:6: error: 'void dfs(int)' previously defined here void dfs(int k) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:53:5: error: redefinition of 'int main()' int main() ^ componenteconexe.cpp:14:5: error: 'int main()' previously defined here int main() ^ componenteconexe.cpp: At global scope: componenteconexe.cpp:82:11: error: redefinition of 'std::ifstream f' ifstream f("componenteconexe.in"); ^ componenteconexe.cpp:4:10: error: 'std::ifstream f' previously declared here ifstream f("componenteconexe.in"); ^ componenteconexe.cpp:83:11: error: redefinition of 'std::ofstream g' ofstream g("componenteconexe.out"); ^ componenteconexe.cpp:5:10: error: 'std::ofstream g' previously declared here ofstream g("componenteconexe.out"); ^ componenteconexe.cpp:84:15: error: redefinition of 'int a [101][101]' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:5: error: 'int a [101][101]' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:84:17: error: redefinition of 'int n' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:17: error: 'int n' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:84:19: error: redefinition of 'int i' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:19: error: 'int i' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:84:21: error: redefinition of 'int j' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:21: error: 'int j' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:84:28: error: redefinition of 'int v [101]' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:23: error: 'int v [101]' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:84:35: error: redefinition of 'int m [101]' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:30: error: 'int m [101]' previously declared here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:84:37: error: redefinition of 'int l' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:37: error: 'int l' previously defined here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:84:41: error: redefinition of 'int nrc' int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp:6:41: error: 'int nrc' previously defined here int a[101][101],n,i,j,v[101],m[101],l=1,nrc=0; ^ componenteconexe.cpp: In function 'void dfs(int)': componenteconexe.cpp:85:6: error: redefinition of 'void dfs(int)' void dfs(int k) ^ componenteconexe.cpp:7:6: error: 'void dfs(int)' previously defined here void dfs(int k) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:92:5: error: redefinition of 'int main()' int main() ^ componenteconexe.cpp:14:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe 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ă.