#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 | #4846711 | Utilizator | |
Fișier | veriflant.cpp | Dimensiune | 953 B |
Data încărcării | 30 Martie 2017, 08:35 | Scor / rezultat | Eroare de compilare |
veriflant.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("veriflant.in"); ^ veriflant.cpp:4:1: error: 'ofstream' does not name a type ofstream fout("veriflant.out") ^ veriflant.cpp:7:1: error: 'string' does not name a type string s; ^ veriflant.cpp: In function 'int main()': veriflant.cpp:9:5: error: 'fin' was not declared in this scope fin >> n >> m; ^ veriflant.cpp:17:16: error: 's' was not declared in this scope fin >> s; ^ veriflant.cpp:19:9: error: 'ok1' was not declared in this scope ok1 = 1; ^ veriflant.cpp:30:16: error: 'fout' was not declared in this scope fout << "ELEMENTAR" << endl; ^ veriflant.cpp:30:39: error: 'endl' was not declared in this scope fout << "ELEMENTAR" << endl; ^ veriflant.cpp:30:39: note: suggested alternative: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/fstream:38, from veriflant.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ veriflant.cpp:32:16: error: 'fout' was not declared in this scope fout << "NEELEMENTAR" << endl; ^ veriflant.cpp:32:41: error: 'endl' was not declared in this scope fout << "NEELEMENTAR" << endl; ^ veriflant.cpp:32:41: note: suggested alternative: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/fstream:38, from veriflant.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ veriflant.cpp:34:13: error: 'fout' was not declared in this scope fout << "NU"; ^
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ă.