#2164
munte1
Maria pleacă în excursie la munte. Traseul de la baza muntelui și până la vârf trece printr-o serie de parcele organizate într-o matrice pătratică de dimensiune nxn
. Baza muntelui se consideră primul element al matricei, iar vârful, ultimul element. Se cunoaște faptul că traseele de la bază până la vârf au numai suișuri. Maria dispune de un altimetru prin intermediul căruia poate determina altitudinea la care se găsește parcela pe care se află. Ea nu-și propune să urce până la vârf, ci doar până la o anumită altitudine. Cunoscând valoarea n
, harta de dimensiune nxn
cu altitudinile precizate și x
o valoare ce reprezintă altitudinea la care trebuie să ajungă Maria, se cere să se determine coordonatele parcelei cu altitudinea x
.
Problema | munte1 | Operații I/O |
munte1.in /munte1.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 6 MB
/
Stivă 2 MB
|
Id soluție | #50628600 | Utilizator | |
Fișier | munte1.cpp | Dimensiune | 680 B |
Data încărcării | 17 Aprilie 2024, 18:10 | Scor / rezultat | Eroare de compilare |
munte1.cpp: In function 'int main()': munte1.cpp:23:6: error: use of deleted function 'std::basic_ifstream<char>& std::basic_ifstream<char>::operator=(const std::basic_ifstream<char>&)' f=ifstream("munte1.in"); ^ In file included from munte1.cpp:2:0: /usr/include/c++/4.8/fstream:427:11: note: 'std::basic_ifstream<char>& std::basic_ifstream<char>::operator=(const std::basic_ifstream<char>&)' is implicitly deleted because the default definition would be ill-formed: class basic_ifstream : public basic_istream<_CharT, _Traits> ^ /usr/include/c++/4.8/fstream:427:11: error: use of deleted function 'std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)' In file included from /usr/include/c++/4.8/iostream:40:0, from munte1.cpp:1: /usr/include/c++/4.8/istream:58:11: note: 'std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)' is implicitly deleted because the default definition would be ill-formed: class basic_istream : virtual public basic_ios<_CharT, _Traits> ^ /usr/include/c++/4.8/istream:58:11: error: use of deleted function 'std::basic_ios<char>& std::basic_ios<char>::operator=(const std::basic_ios<char>&)' In file included from /usr/include/c++/4.8/ios:44:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from munte1.cpp:1: /usr/include/c++/4.8/bits/basic_ios.h:66:11: note: 'std::basic_ios<char>& std::basic_ios<char>::operator=(const std::basic_ios<char>&)' is implicitly deleted because the default definition would be ill-formed: class basic_ios : public ios_base ^ In file included from /usr/include/c++/4.8/ios:42:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from munte1.cpp:1: /usr/include/c++/4.8/bits/ios_base.h:795:5: error: 'std::ios_base& std::ios_base::operator=(const std::ios_base&)' is private operator=(const ios_base&); ^ In file included from /usr/include/c++/4.8/ios:44:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from munte1.cpp:1: /usr/include/c++/4.8/bits/basic_ios.h:66:11: error: within this context class basic_ios : public ios_base ^ In file included from munte1.cpp:2:0: /usr/include/c++/4.8/fstream:427:11: error: use of deleted function 'std::basic_filebuf<char>& std::basic_filebuf<char>::operator=(const std::basic_filebuf<char>&)' class basic_ifstream : public basic_istream<_CharT, _Traits> ^ /usr/include/c++/4.8/fstream:72:11: note: 'std::basic_filebuf<char>& std::basic_filebuf<char>::operator=(const std::basic_filebuf<char>&)' is implicitly deleted because the default definition would be ill-formed: class basic_filebuf : public basic_streambuf<_CharT, _Traits> ^ In file included from /usr/include/c++/4.8/ios:43:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from munte1.cpp:1: /usr/include/c++/4.8/streambuf:810:7: error: 'std::basic_streambuf<_CharT, _Traits>& std::basic_streambuf<_CharT, _Traits>::operator=(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is private operator=(const basic_streambuf&) { return *this; }; ^ In file included from munte1.cpp:2:0: /usr/include/c++/4.8/fstream:72:11: error: within this context class basic_filebuf : public basic_streambuf<_CharT, _Traits> ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema munte1 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ă.