#474
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 | #64375607 | Utilizator | |
| Fișier | veriflant.cpp | Dimensiune | 774 B |
| Data încărcării | 04 Mai 2026, 11:14 | Scor/rezultat | Eroare de compilare |
veriflant.cpp: In function ‘int elementar(int*, int)’: veriflant.cpp:13:20: error: ‘n’ was not declared in this scope 13 | for(int i=1;i<=n-1;i++) | ^ veriflant.cpp: In function ‘int main()’: veriflant.cpp:21:5: error: ‘fin’ was not declared in this scope 21 | fin>>n>>m; | ^~~ veriflant.cpp:21:10: error: ‘n’ was not declared in this scope 21 | fin>>n>>m; | ^ veriflant.cpp:21:13: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 21 | fin>>n>>m; | ^ | tm veriflant.cpp:24:14: error: ‘x’ was not declared in this scope 24 | fin>>x>>y; | ^ veriflant.cpp:24:17: error: ‘y’ was not declared in this scope 24 | fin>>x>>y; | ^ veriflant.cpp:27:10: error: ‘k’ was not declared in this scope 27 | fin>>k; | ^ veriflant.cpp:30:14: error: ‘nr’ was not declared in this scope 30 | fin>>nr; | ^~ veriflant.cpp:31:13: error: ‘i’ was not declared in this scope 31 | for(i=1;i<=nr;i++) | ^ veriflant.cpp:32:18: error: ‘v’ was not declared in this scope 32 | fin>>v[i]; | ^ veriflant.cpp:33:17: error: ‘v’ was not declared in this scope 33 | if(lant(v,nr)==0) | ^ veriflant.cpp:34:13: error: ‘fout’ was not declared in this scope 34 | fout<<"NU"<<andl; | ^~~~ veriflant.cpp:34:25: error: ‘andl’ was not declared in this scope 34 | fout<<"NU"<<andl; | ^~~~ veriflant.cpp:36:13: error: ‘fout’ was not declared in this scope 36 | fout<<"Elementar"<<endl; | ^~~~ veriflant.cpp:37:14: error: ‘fout’ was not declared in this scope 37 | else fout<<"NEELEMENTAR"<<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ă.