#541
Lant1
Se dă lista muchiilor unui graf neorientat și trei vârfuri p q r
. Să se determine un lanț cu extremitățile p q
care conține vârful r
.
Problema | Lant1 | Operații I/O |
![]() lant1.in /lant1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #15551180 | Utilizator | |
Fișier | lant1.cpp | Dimensiune | 1.73 KB |
Data încărcării | 22 Aprilie 2019, 16:20 | Scor / rezultat | Eroare de compilare |
lant1.cpp:39:2: error: stray '#' in program }#include <fstream> ^ lant1.cpp:39:3: error: 'include' does not name a type }#include <fstream> ^ lant1.cpp:42:15: error: redefinition of 'int A [101][101]' int A[101][101]; ^ lant1.cpp:4:5: error: 'int A [101][101]' previously declared here int A[101][101]; ^ lant1.cpp:43:13: error: redefinition of 'bool viz [101]' bool viz[101], ok = 1; ^ lant1.cpp:5:6: error: 'bool viz [101]' previously declared here bool viz[101], ok=1; ^ lant1.cpp:43:16: error: redefinition of 'bool ok' bool viz[101], ok = 1; ^ lant1.cpp:5:16: error: 'bool ok' previously defined here bool viz[101], ok=1; ^ lant1.cpp:44:13: error: redefinition of 'int sol [5001]' int sol[5001]; ^ lant1.cpp:6:5: error: 'int sol [5001]' previously declared here int sol[5001]; ^ lant1.cpp:45:5: error: redefinition of 'int n' int n, r, p, q, x, y; ^ lant1.cpp:7:5: error: 'int n' previously declared here int n, r, p, q, x, y; ^ lant1.cpp:45:8: error: redefinition of 'int r' int n, r, p, q, x, y; ^ lant1.cpp:7:8: error: 'int r' previously declared here int n, r, p, q, x, y; ^ lant1.cpp:45:11: error: redefinition of 'int p' int n, r, p, q, x, y; ^ lant1.cpp:7:11: error: 'int p' previously declared here int n, r, p, q, x, y; ^ lant1.cpp:45:14: error: redefinition of 'int q' int n, r, p, q, x, y; ^ lant1.cpp:7:14: error: 'int q' previously declared here int n, r, p, q, x, y; ^ lant1.cpp:45:17: error: redefinition of 'int x' int n, r, p, q, x, y; ^ lant1.cpp:7:17: error: 'int x' previously declared here int n, r, p, q, x, y; ^ lant1.cpp:45:20: error: redefinition of 'int y' int n, r, p, q, x, y; ^ lant1.cpp:7:20: error: 'int y' previously declared here int n, r, p, q, x, y; ^ lant1.cpp:48:11: error: redefinition of 'std::ifstream f' ifstream f("lant1.in"); ^ lant1.cpp:10:10: error: 'std::ifstream f' previously declared here ifstream f("lant1.in"); ^ lant1.cpp:49:11: error: redefinition of 'std::ofstream g' ofstream g("lant1.out"); ^ lant1.cpp:11:10: error: 'std::ofstream g' previously declared here ofstream g("lant1.out"); ^ lant1.cpp: In function 'void afis(int)': lant1.cpp:51:6: error: redefinition of 'void afis(int)' void afis(int k) ^ lant1.cpp:13:6: error: 'void afis(int)' previously defined here void afis(int k) ^ lant1.cpp: In function 'void backt(int)': lant1.cpp:58:6: error: redefinition of 'void backt(int)' void backt(int k) ^ lant1.cpp:20:6: error: 'void backt(int)' previously defined here void backt(int k) ^ lant1.cpp: In function 'int main()': lant1.cpp:88:5: error: redefinition of 'int main()' int main() ^ lant1.cpp:76:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lant1 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ă.