#3975
Intervale_AB
Dându-se N
intervale [a, b]
, calculați numărul maxim de astfel de intervale care se intersectează în cel puțin un punct.
ad-hoc
Problema | Intervale_AB | Operații I/O |
intervale.in /intervale.out
|
---|---|---|---|
Limita timp | 0.4 secunde | Limita memorie |
Total: 16 MB
/
Stivă 8 MB
|
Id soluție | #51335122 | Utilizator | |
Fișier | intervale_ab.cpp | Dimensiune | 826 B |
Data încărcării | 08 Iunie 2024, 10:32 | Scor / rezultat | Eroare de compilare |
intervale_ab.cpp: In function 'int main()': intervale_ab.cpp:31:23: error: use of deleted function 'std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)' sort(v+1,v+2*n+1,f); ^ In file included from intervale_ab.cpp:2:0: /usr/include/c++/4.8/fstream:427:11: note: 'std::basic_ifstream<char>::basic_ifstream(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>::basic_istream(const std::basic_istream<char>&)' In file included from /usr/include/c++/4.8/iostream:40:0, from intervale_ab.cpp:1: /usr/include/c++/4.8/istream:58:11: note: 'std::basic_istream<char>::basic_istream(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>::basic_ios(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 intervale_ab.cpp:1: /usr/include/c++/4.8/bits/basic_ios.h:66:11: note: 'std::basic_ios<char>::basic_ios(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 intervale_ab.cpp:1: /usr/include/c++/4.8/bits/ios_base.h:792:5: error: 'std::ios_base::ios_base(const std::ios_base&)' is private ios_base(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 intervale_ab.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 intervale_ab.cpp:2:0: /usr/include/c++/4.8/fstream:427:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)' class basic_ifstream : public basic_istream<_CharT, _Traits> ^ /usr/include/c++/4.8/fstream:427:11: error: use of deleted function 'std::basic_filebuf<char>::basic_filebuf(const std::basic_filebuf<char>&)' /usr/include/c++/4.8/fstream:72:11: note: 'std::basic_filebuf<char>::basic_filebuf(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 intervale_ab.cpp:1: /usr/include/c++/4.8/streambuf:802:7: error: 'std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is private basic_streambuf(const basic_streambuf& __sb) ^ In file included from intervale_ab.cpp:2:0: /usr/include/c++/4.8/fstream:72:11: error: within this context class basic_filebuf : public basic_streambuf<_CharT, _Traits> ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from intervale_ab.cpp:3: /usr/include/c++/4.8/bits/stl_algo.h:5483:5: error: initializing argument 3 of 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = vec*; _Compare = std::basic_ifstream<char>]' sort(_RandomAccessIterator __first, _RandomAccessIterator __last, ^ /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = vec*; _Compare = std::basic_ifstream<char>]': intervale_ab.cpp:31:23: required from here /usr/include/c++/4.8/bits/stl_algo.h:5499:44: error: use of deleted function 'std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)' std::__lg(__last - __first) * 2, __comp); ^ /usr/include/c++/4.8/bits/stl_algo.h:2324:5: error: initializing argument 4 of 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = vec*; _Size = int; _Compare = std::basic_ifstream<char>]' __introsort_loop(_RandomAccessIterator __first, ^ /usr/include/c++/4.8/bits/stl_algo.h:5500:55: error: use of deleted function 'std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)' std::__final_insertion_sort(__first, __last, __comp); ^ /usr/include/c++/4.8/bits/stl_algo.h:2221:5: error: initializing argument 3 of 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = vec*; _Compare = std::basic_ifstream<char>]' __final_insertion_sort(_RandomAccessIterator __first, ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Intervale_AB 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ă.