#261
Se dau n intervale [a,b], unde a şi b sunt numere întregi. Să se afişeze acele intervale care au proprietatea că intersecţia lor cu oricare dintre celelalte n-1 intervale este mulţimea vidă.
| Problema | Intervale | Operații I/O |
intervale.in/intervale.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64042407 | Utilizator | |
| Fișier | intervale.cpp | Dimensiune | 807 B |
| Data încărcării | 11 Aprilie 2026, 18:43 | Scor/rezultat | Eroare de compilare |
In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/c++allocator.h:33:0, from /usr/include/c++/4.8/bits/allocator.h:46, from /usr/include/c++/4.8/string:41, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from intervale.cpp:1: /usr/include/c++/4.8/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Event; _Args = {int&, int}; _Tp = Event]': /usr/include/c++/4.8/bits/alloc_traits.h:254:4: required from 'static typename std::enable_if<std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::value, void>::type std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = Event; _Args = {int&, int}; _Alloc = std::allocator<Event>; typename std::enable_if<std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::value, void>::type = void]' /usr/include/c++/4.8/bits/alloc_traits.h:393:57: required from 'static decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = Event; _Args = {int&, int}; _Alloc = std::allocator<Event>; decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) = <type error>]' /usr/include/c++/4.8/bits/vector.tcc:97:40: required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int&, int}; _Tp = Event; _Alloc = std::allocator<Event>]' intervale.cpp:27:33: required from here /usr/include/c++/4.8/ext/new_allocator.h:120:4: error: new initializer expression list treated as compound expression [-fpermissive] { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } ^ /usr/include/c++/4.8/ext/new_allocator.h:120:4: error: no matching function for call to 'Event::Event(int)' /usr/include/c++/4.8/ext/new_allocator.h:120:4: note: candidates are: intervale.cpp:9:8: note: Event::Event() struct Event { ^ intervale.cpp:9:8: note: candidate expects 0 arguments, 1 provided intervale.cpp:9:8: note: constexpr Event::Event(const Event&) intervale.cpp:9:8: note: no known conversion for argument 1 from 'int' to 'const Event&' intervale.cpp:9:8: note: constexpr Event::Event(Event&&) intervale.cpp:9:8: note: no known conversion for argument 1 from 'int' to 'Event&&'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Intervale 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ă.