#2665
Dată fiind o matrice dreptunghiulară cu elemente 0 şi 1, care este aria maximă a unui dreptunghi format numai din elemente egale cu 1?
| Problema | Dreptunghi1 | Operații I/O |
dreptunghi1.in/dreptunghi1.out
|
|---|---|---|---|
| Limita timp | 2.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 56 MB
|
| Id soluție | #61599618 | Utilizator | |
| Fișier | dreptunghi1.cpp | Dimensiune | 1.29 KB |
| Data încărcării | 03 Decembrie 2025, 18:00 | Scor/rezultat | Eroare de compilare |
In file included from /usr/include/c++/4.8/algorithm:62:0, from dreptunghi1.cpp:5: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Tp = std::pair<int, int>; _Compare = int (*)(std::pair<int, int>&, std::pair<int, int>&)]': /usr/include/c++/4.8/bits/stl_algo.h:2296:78: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Compare = int (*)(std::pair<int, int>&, std::pair<int, int>&)]' /usr/include/c++/4.8/bits/stl_algo.h:2337:62: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = std::pair<int, int>*; _Size = int; _Compare = int (*)(std::pair<int, int>&, std::pair<int, int>&)]' /usr/include/c++/4.8/bits/stl_algo.h:5499:44: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::pair<int, int>*; _Compare = int (*)(std::pair<int, int>&, std::pair<int, int>&)]' dreptunghi1.cpp:45:23: required from here /usr/include/c++/4.8/bits/stl_algo.h:2263:35: error: invalid initialization of reference of type 'std::pair<int, int>&' from expression of type 'const std::pair<int, int>' while (__comp(*__first, __pivot)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2266:34: error: invalid initialization of reference of type 'std::pair<int, int>&' from expression of type 'const std::pair<int, int>' while (__comp(__pivot, *__last)) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Dreptunghi1 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ă.