#431
Se dau mai multe grafuri neorientate, prin matricea de adiacență. Să se verifice despre fiecare graf dacă este complet.
| Problema | Graf complet | Operații I/O |
graf_complet.in/graf_complet.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64315229 | Utilizator | |
| Fișier | graf_complet.cpp | Dimensiune | 477 B |
| Data încărcării | 29 Aprilie 2026, 11:18 | Scor/rezultat | Eroare de compilare |
graf_complet.cpp: In function ‘int main()’: graf_complet.cpp:5:5: error: ‘ifstream’ was not declared in this scope 5 | ifstream fin>>(" graf_complet.in"); | ^~~~~~~~ graf_complet.cpp:1:1: note: ‘std::ifstream’ is defined in header ‘<fstream>’; did you forget to ‘#include <fstream>’? +++ |+#include <fstream> 1 | using namespace std; graf_complet.cpp:6:5: error: ‘ofstream’ was not declared in this scope 6 | ofstream fout<<(" graf_complet.in"); | ^~~~~~~~ graf_complet.cpp:6:5: note: ‘std::ofstream’ is defined in header ‘<fstream>’; did you forget to ‘#include <fstream>’? graf_complet.cpp:8:1: error: ‘fin’ was not declared in this scope 8 | fin>>n; | ^~~ graf_complet.cpp:22:12: error: ‘fout’ was not declared in this scope 22 | if(ok) fout<<"DA"<<endl; | ^~~~ graf_complet.cpp:22:24: error: ‘endl’ was not declared in this scope 22 | if(ok) fout<<"DA"<<endl; | ^~~~ graf_complet.cpp:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’? +++ |+#include <ostream> 1 | using namespace std; graf_complet.cpp:23:10: error: ‘fout’ was not declared in this scope 23 | else fout<<"NU"<<endl; | ^~~~ graf_complet.cpp:23:22: error: ‘endl’ was not declared in this scope 23 | else fout<<"NU"<<endl; | ^~~~ graf_complet.cpp:23:22: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Graf complet 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ă.