#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 | #64694222 | Utilizator | |
| Fișier | veriflant.cpp | Dimensiune | 608 B |
| Data încărcării | 24 Mai 2026, 03:58 | Scor/rezultat | Eroare de compilare |
veriflant.cpp:3:7: error: expected nested-name-specifier before ‘neamespace’ 3 | using neamespace std; | ^~~~~~~~~~ veriflant.cpp:4:1: error: ‘ifstream’ does not name a type 4 | ifstream fin("veriflant.in"); | ^~~~~~~~ veriflant.cpp:5:1: error: ‘ofstream’ does not name a type 5 | ofstream fout("veriflant.out"); | ^~~~~~~~ veriflant.cpp: In function ‘int main()’: veriflant.cpp:9:2: error: ‘fin’ was not declared in this scope 9 | fin>>n>>m; | ^~~ veriflant.cpp:31:6: error: ‘fout’ was not declared in this scope 31 | fout<<"ELEMENTAR"<<endl; | ^~~~ veriflant.cpp:31:25: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’? 31 | fout<<"ELEMENTAR"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/13/iostream:41, from veriflant.cpp:1: /usr/include/c++/13/ostream:735:5: note: ‘std::endl’ declared here 735 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ veriflant.cpp:33:6: error: ‘fout’ was not declared in this scope 33 | fout<<"NEELEMENTAR"<<endl; | ^~~~ veriflant.cpp:33:27: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’? 33 | fout<<"NEELEMENTAR"<<endl; | ^~~~ | std::endl /usr/include/c++/13/ostream:735:5: note: ‘std::endl’ declared here 735 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ veriflant.cpp:35:6: error: ‘fout’ was not declared in this scope 35 | fout<<"NU"<<endl; | ^~~~ veriflant.cpp:35:18: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’? 35 | fout<<"NU"<<endl; | ^~~~ | std::endl /usr/include/c++/13/ostream:735:5: note: ‘std::endl’ declared here 735 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ veriflant.cpp: At global scope: veriflant.cpp:37:1: error: expected unqualified-id before ‘return’ 37 | return 0; | ^~~~~~ veriflant.cpp:38:1: error: expected declaration before ‘}’ token 38 | } | ^
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ă.