#1972
Hambar
Să se determine dreptunghiul de arie maximă ce conține numai 0
.
Problema | Hambar | Operații I/O |
![]() hambar.in /hambar.out
|
---|---|---|---|
Limita timp | 3 secunde | Limita memorie |
Total: 5 MB
/
Stivă 1 MB
|
Id soluție | #51476021 | Utilizator | |
Fișier | hambar.cpp | Dimensiune | 2.01 KB |
Data încărcării | 24 Iunie 2024, 09:53 | Scor / rezultat | Eroare de compilare |
hambar.cpp: In function 'void cautareArie(int)': hambar.cpp:42:14: error: expected unqualified-id before '[' token auto [st, dr] = q.front(); ^ hambar.cpp:45:19: error: 'st' was not declared in this scope int ssi = st.first, ssj = st.second; ^ hambar.cpp:46:19: error: 'dr' was not declared in this scope int dji = dr.first, djj = dr.second; ^ hambar.cpp:48:26: error: 'ssj' was not declared in this scope if (ssi > dji || ssj > djj) continue; ^ hambar.cpp:48:32: error: 'djj' was not declared in this scope if (ssi > dji || ssj > djj) continue; ^ hambar.cpp:50:31: error: 'ssj' was not declared in this scope if (!gasireCopac(ssi, ssj, dji, djj)) { ^ hambar.cpp:50:41: error: 'djj' was not declared in this scope if (!gasireCopac(ssi, ssj, dji, djj)) { ^ hambar.cpp:55:60: error: no matching function for call to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::push(<brace-enclosed initializer list>)' q.push({{ssi, ssj}, {dji, copac.y - 1}}); ^ hambar.cpp:55:60: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from hambar.cpp:5: /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::pair<int, int>, std::pair<int, int> >&}' /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::value_type&& {aka std::pair<std::pair<int, int>, std::pair<int, int> >&&}' hambar.cpp:56:60: error: no matching function for call to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::push(<brace-enclosed initializer list>)' q.push({{ssi, copac.y + 1}, {dji, djj}}); ^ hambar.cpp:56:60: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from hambar.cpp:5: /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::pair<int, int>, std::pair<int, int> >&}' /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::value_type&& {aka std::pair<std::pair<int, int>, std::pair<int, int> >&&}' hambar.cpp:57:60: error: no matching function for call to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::push(<brace-enclosed initializer list>)' q.push({{ssi, ssj}, {copac.x - 1, djj}}); ^ hambar.cpp:57:60: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from hambar.cpp:5: /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::pair<int, int>, std::pair<int, int> >&}' /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::value_type&& {aka std::pair<std::pair<int, int>, std::pair<int, int> >&&}' hambar.cpp:58:60: error: no matching function for call to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::push(<brace-enclosed initializer list>)' q.push({{copac.x + 1, ssj}, {dji, djj}}); ^ hambar.cpp:58:60: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from hambar.cpp:5: /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::pair<int, int>, std::pair<int, int> >&}' /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Sequence = std::deque<std::pair<std::pair<int, int>, std::pair<int, int> >, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int> > > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::pair<int, int>, std::pair<int, int> >] push(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::queue<std::pair<std::pair<int, int>, std::pair<int, int> > >::value_type&& {aka std::pair<std::pair<int, int>, std::pair<int, int> >&&}'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Hambar 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ă.