#474
VerifLant
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și o succesiune de k
vârfuri. Să se verifice dacă vârfurile din succesiune formează un lanț.
Problema | VerifLant | Operații I/O |
veriflant.in /veriflant.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48996104 | Utilizator | |
Fișier | veriflant.cpp | Dimensiune | 1016 B |
Data încărcării | 12 Februarie 2024, 12:19 | Scor / rezultat | Eroare de compilare |
veriflant.cpp: In function 'void creare_matrice()': veriflant.cpp:9:5: error: 'f' was not declared in this scope f>>n>>m; ^ veriflant.cpp:12:12: error: 'i' was not declared in this scope f>>i>>j; ^ veriflant.cpp:12:15: error: 'j' was not declared in this scope f>>i>>j; ^ veriflant.cpp: In function 'bool verfif_elem(int, int*)': veriflant.cpp:24:1: error: expected primary-expression before '}' token } ^ veriflant.cpp:24:1: error: expected ';' before '}' token veriflant.cpp:20:10: warning: unused variable 'este' [-Wunused-variable] bool este = true;// presup ca este elem; ^ veriflant.cpp:24:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ veriflant.cpp: At global scope: veriflant.cpp:25:9: error: expected unqualified-id before 'return' return false; ^ veriflant.cpp:26:9: error: expected unqualified-id before 'return' return true; ^ veriflant.cpp: In function 'void citire_sir()': veriflant.cpp:29:13: error: 'f' was not declared in this scope f>>L; ^ veriflant.cpp:29:16: error: 'L' was not declared in this scope f>>L; ^ veriflant.cpp:31:20: error: 'v' was not declared in this scope f>>v[i]; ^ veriflant.cpp: In function 'int main()': veriflant.cpp:36:11: error: expected ';' before 'int' int nr;f>>nr; ^ veriflant.cpp:36:18: error: 'f' was not declared in this scope int nr;f>>nr; ^ veriflant.cpp:36:21: error: 'nr' was not declared in this scope int nr;f>>nr; ^ veriflant.cpp:37:28: error: expected ';' before ')' token for(int i=1;i<=nr) ^ veriflant.cpp:40:29: error: 'L' was not declared in this scope if(verif_lant(L,v)==true) ^ veriflant.cpp:40:31: error: 'v' was not declared in this scope if(verif_lant(L,v)==true) ^ veriflant.cpp:40:32: error: 'verif_lant' was not declared in this scope if(verif_lant(L,v)==true) ^ veriflant.cpp:42:36: error: 'verif_elem' was not declared in this scope if(verif_elem(L,v)==true) ^ veriflant.cpp:43:21: error: 'g' was not declared in this scope g<<"ELEMENTAR"<<endl; ^ veriflant.cpp:44:24: error: 'g' was not declared in this scope else g<<"NEELEMENTAR"<<endl; ^ veriflant.cpp:46:20: error: 'g' was not declared in this scope else g<<"nu"<<endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifLant 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ă.