#2779
cntSQ
Se dă o matrice binară (valori 0
și 1
). Să se determine câte pătrate exista cu proprietatea că acestea au pe marginea lor doar valori 1
.
Problema | cntSQ | Operații I/O |
cntsq.in /cntsq.out
|
---|---|---|---|
Limita timp | 0.15 secunde | Limita memorie |
Total: 32 MB
/
Stivă 8 MB
|
Id soluție | #28970301 | Utilizator | |
Fișier | cntsq.cpp | Dimensiune | 1.95 KB |
Data încărcării | 25 Martie 2021, 13:15 | Scor / rezultat | Eroare de compilare |
cntsq.cpp: In function 'void Solve(int, int)': cntsq.cpp:83:14: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') T[i] = 0; ^ cntsq.cpp:83:14: note: candidates are: In file included from /usr/include/c++/4.8/vector:69:0, from cntsq.cpp:5: /usr/include/c++/4.8/bits/vector.tcc:160:5: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>] vector<_Tp, _Alloc>:: ^ /usr/include/c++/4.8/bits/vector.tcc:160:5: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&' In file included from /usr/include/c++/4.8/vector:64:0, from cntsq.cpp:5: /usr/include/c++/4.8/bits/stl_vector.h:439:7: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>] operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) ^ /usr/include/c++/4.8/bits/stl_vector.h:439:7: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&' /usr/include/c++/4.8/bits/stl_vector.h:461:7: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>] operator=(initializer_list<value_type> __l) ^ /usr/include/c++/4.8/bits/stl_vector.h:461:7: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cntSQ 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ă.