#3489
Dându-se o mulțime de puncte și o mulțime de cercuri, pentru fiecare cerc să se stabilească câte puncte conține.
| Problema | Numara punctele | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64891957 | Utilizator | |
| Fișier | numara_punctele.cpp | Dimensiune | 2.16 KB |
| Data încărcării | 10 Iunie 2026, 00:30 | Scor/rezultat | Eroare de compilare |
numara_punctele.cpp: In function ‘int main()’: numara_punctele.cpp:53:38: error: no matching function for call to ‘max(<brace-enclosed initializer list>)’ 53 | double furthest = max({ | ~~~^~ 54 | d2(xc, yc, bottom, left), | ~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | d2(xc, yc, bottom, right), | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | d2(xc, yc, top, left), | ~~~~~~~~~~~~~~~~~~~~~~ 57 | d2(xc, yc, top, right) | ~~~~~~~~~~~~~~~~~~~~~~ 58 | }); | ~~ In file included from /usr/include/c++/13/string:51, from /usr/include/c++/13/bits/locale_classes.h:40, from /usr/include/c++/13/bits/ios_base.h:41, from /usr/include/c++/13/ios:44, from /usr/include/c++/13/ostream:40, from /usr/include/c++/13/iostream:41, from numara_punctele.cpp:1: /usr/include/c++/13/bits/stl_algobase.h:257:5: note: candidate: ‘template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)’ 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed: numara_punctele.cpp:53:38: note: candidate expects 2 arguments, 1 provided 53 | double furthest = max({ | ~~~^~ 54 | d2(xc, yc, bottom, left), | ~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | d2(xc, yc, bottom, right), | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | d2(xc, yc, top, left), | ~~~~~~~~~~~~~~~~~~~~~~ 57 | d2(xc, yc, top, right) | ~~~~~~~~~~~~~~~~~~~~~~ 58 | }); | ~~ /usr/include/c++/13/bits/stl_algobase.h:303:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’ 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:303:5: note: template argument deduction/substitution failed: numara_punctele.cpp:53:38: note: candidate expects 3 arguments, 1 provided 53 | double furthest = max({ | ~~~^~ 54 | d2(xc, yc, bottom, left), | ~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | d2(xc, yc, bottom, right), | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 | d2(xc, yc, top, left), | ~~~~~~~~~~~~~~~~~~~~~~ 57 | d2(xc, yc, top, right) | ~~~~~~~~~~~~~~~~~~~~~~ 58 | }); | ~~ numara_punctele.cpp:65:37: error: no matching function for call to ‘min(<brace-enclosed initializer list>)’ 65 | double nearest = min({ | ~~~^~ 66 | d2(xc, yc, bottom, left), | ~~~~~~~~~~~~~~~~~~~~~~~~~ 67 | d2(xc, yc, bottom, right), | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 | d2(xc, yc, top, left), | ~~~~~~~~~~~~~~~~~~~~~~ 69 | d2(xc, yc, top, right) | ~~~~~~~~~~~~~~~~~~~~~~ 70 | }); | ~~ /usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)’ 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: numara_punctele.cpp:65:37: note: candidate expects 2 arguments, 1 provided 65 | double nearest = min({ | ~~~^~ 66 | d2(xc, yc, bottom, left), | ~~~~~~~~~~~~~~~~~~~~~~~~~ 67 | d2(xc, yc, bottom, right), | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 | d2(xc, yc, top, left), | ~~~~~~~~~~~~~~~~~~~~~~ 69 | d2(xc, yc, top, right) | ~~~~~~~~~~~~~~~~~~~~~~ 70 | }); | ~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’ 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed: numara_punctele.cpp:65:37: note: candidate expects 3 arguments, 1 provided 65 | double nearest = min({ | ~~~^~ 66 | d2(xc, yc, bottom, left), | ~~~~~~~~~~~~~~~~~~~~~~~~~ 67 | d2(xc, yc, bottom, right), | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 | d2(xc, yc, top, left), | ~~~~~~~~~~~~~~~~~~~~~~ 69 | d2(xc, yc, top, right) | ~~~~~~~~~~~~~~~~~~~~~~ 70 | }); | ~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numara punctele 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ă.