#413
Adiacenta1
Se dă lista muchiilor unui graf neorientat. Să se afișeze matricea de adiacență a grafului.
Problema | Adiacenta1 | Operații I/O |
adiacenta1.in /adiacenta1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54378366 | Utilizator | |
Fișier | adiacenta1.cpp | Dimensiune | 401 B |
Data încărcării | 27 Noiembrie 2024, 08:46 | Scor / rezultat | Eroare de compilare |
adiacenta1.cpp:2:1: error: 'ifstream' does not name a type ifstream f("adiacenta1.in"); ^ adiacenta1.cpp:3:1: error: 'ofstream' does not name a type ofstream g("adiacenta1.out"); ^ adiacenta1.cpp: In function 'void citire()': adiacenta1.cpp:7:9: error: 'f' was not declared in this scope while (f>>i>>j) ^ adiacenta1.cpp:10:12: warning: statement has no effect [-Wunused-value] if(j>n) n-j; ^ adiacenta1.cpp: In function 'void afis()': adiacenta1.cpp:15:16: error: 'J' was not declared in this scope {for (int j=1; J<=n; j++) ^ adiacenta1.cpp:16:5: error: 'g' was not declared in this scope g<<a[i][j]; ^ adiacenta1.cpp:17:2: error: 'g' was not declared in this scope g<<endl; ^ adiacenta1.cpp:17:5: error: 'endl' was not declared in this scope g<<endl; ^ adiacenta1.cpp:17:5: note: suggested alternative: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/fstream:38, from adiacenta1.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ adiacenta1.cpp: In function 'int main()': adiacenta1.cpp:24:5: error: 'f' was not declared in this scope f.close(); ^ adiacenta1.cpp:25:5: error: 'g' was not declared in this scope g.close(); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Adiacenta1 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ă.