#437
Conex
Se dă lista muchiilor unui graf neorientat. Să se verifice dacă graful este sau nu conex.
Problema | Conex | Operații I/O |
conex.in /conex.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #47896497 | Utilizator | |
Fișier | conex.cpp | Dimensiune | 944 B |
Data încărcării | 09 Ianuarie 2024, 12:41 | Scor / rezultat | Eroare de compilare |
conex.cpp:28:2: error: stray '#' in program }#include <fstream> ^ conex.cpp:3:26: error: expected ']' before ';' token int a[101][101],n,viz[101; ^ conex.cpp: In function 'void dfs(int)': conex.cpp:14:1: error: 'viz' was not declared in this scope viz[v] = 1; ^ conex.cpp: In function 'int main()': conex.cpp:22:9: error: 'viz' was not declared in this scope if(!viz[i]) ^ conex.cpp: At global scope: conex.cpp:28:3: error: 'include' does not name a type }#include <fstream> ^ conex.cpp:30:15: error: redefinition of 'int a [101][101]' int a[101][101],n,viz[101; ^ conex.cpp:3:5: error: 'int a [101][101]' previously declared here int a[101][101],n,viz[101; ^ conex.cpp:30:17: error: redefinition of 'int n' int a[101][101],n,viz[101; ^ conex.cpp:3:17: error: 'int n' previously declared here int a[101][101],n,viz[101; ^ conex.cpp:30:26: error: expected ']' before ';' token int a[101][101],n,viz[101; ^ conex.cpp:31:13: error: redefinition of 'std::ifstream fin' ifstream fin("conex.in"); ^ conex.cpp:4:10: error: 'std::ifstream fin' previously declared here ifstream fin("conex.in"); ^ conex.cpp:32:14: error: redefinition of 'std::ofstream fout' ofstream fout("conex.out"); ^ conex.cpp:5:10: error: 'std::ofstream fout' previously declared here ofstream fout("conex.out"); ^ conex.cpp: In function 'void citire()': conex.cpp:33:6: error: redefinition of 'void citire()' void citire(){ ^ conex.cpp:6:6: error: 'void citire()' previously defined here void citire(){ ^ conex.cpp: In function 'void dfs(int)': conex.cpp:40:6: error: redefinition of 'void dfs(int)' void dfs(int v){ ^ conex.cpp:13:6: error: 'void dfs(int)' previously defined here void dfs(int v){ ^ conex.cpp:41:1: error: 'viz' was not declared in this scope viz[v] = 1; ^ conex.cpp: In function 'int main()': conex.cpp:46:5: error: redefinition of 'int main()' int main(){ ^ conex.cpp:19:5: error: 'int main()' previously defined here int main(){ ^ conex.cpp:49:9: error: 'viz' was not declared in this scope if(!viz[i]) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Conex 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ă.