#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 | #53181040 | Utilizator | |
Fișier | adiacenta1.cpp | Dimensiune | 436 B |
Data încărcării | 20 Octombrie 2024, 15:22 | Scor / rezultat | Eroare de compilare |
adiacenta1.cpp:4:1: error: 'ifstream' does not name a type ifstream fin("adiacenta1.in"); ^ adiacenta1.cpp:5:1: error: 'ofstream' does not name a type ofstream fout("adiacenta1.out"); ^ adiacenta1.cpp: In function 'int main()': adiacenta1.cpp:11:13: error: 'fin' was not declared in this scope while (!fin.eof()) ^ adiacenta1.cpp:15:26: error: 'max' was not declared in this scope n=max(n, max(i, j)); ^ adiacenta1.cpp:15:26: note: suggested alternative: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from adiacenta1.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: 'std::max' max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ adiacenta1.cpp:15:27: error: 'max' was not declared in this scope n=max(n, max(i, j)); ^ adiacenta1.cpp:15:27: note: suggested alternative: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from adiacenta1.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: 'std::max' max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ adiacenta1.cpp:15:27: error: redeclaration of '<typeprefixerror>max' n=max(n, max(i, j)); ^ adiacenta1.cpp:15:26: note: previous declaration '<typeprefixerror>max' n=max(n, max(i, j)); ^ adiacenta1.cpp:21:9: error: 'fout' was not declared in this scope fout << v[i][j] << ' '; ^ adiacenta1.cpp:22:17: error: 'endl' was not declared in this scope fout << endl; ^ adiacenta1.cpp:22:17: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from adiacenta1.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^
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ă.