#2424
puncte3
Considerăm că toate punctele de coordonate întregi din plan sunt colorate în negru, cu excepţia a n
puncte care sunt colorate în roşu. Două puncte roşii aflate pe aceeaşi linie orizontală sau pe aceeaşi linie verticală (adică puncte care au aceeaşi ordonată sau aceeaşi abscisă) pot fi unite printr-un segment. Colorăm în roşu toate punctele de coordonate întregi de pe acest segment. Repetăm operaţia cât timp se obţin puncte roşii noi. Cunoscând coordonatele celor n
puncte care erau iniţial roşii, aflaţi numărul maxim de puncte roşii care vor exista în final.
ONI 2004 clasa a X-a
Problema | puncte3 | Operații I/O |
![]() puncte3.in /puncte3.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #56360622 | Utilizator | |
Fișier | puncte3.cpp | Dimensiune | 2.36 KB |
Data încărcării | 15 Februarie 2025, 15:21 | Scor / rezultat | Eroare de compilare |
puncte3.cpp:7:1: error: 'ifstream' does not name a type ifstream cin("puncte3.in"); ^ puncte3.cpp:8:1: error: 'ofstream' does not name a type ofstream cout("puncte3.out"); ^ puncte3.cpp: In lambda function: puncte3.cpp:41:18: error: expected unqualified-id before '[' token auto [x, y] = q.front(); ^ puncte3.cpp:43:27: error: 'x' was not declared in this scope x_vals.insert(x); ^ puncte3.cpp:44:27: error: 'y' was not declared in this scope y_vals.insert(y); ^ puncte3.cpp:48:43: error: no matching function for call to 'std::unordered_set<std::pair<int, int>, PairHash>::count(<brace-enclosed initializer list>)' if (!vizitat.count({x, ny})) { ^ puncte3.cpp:48:43: note: candidate is: In file included from /usr/include/c++/4.8/unordered_set:48:0, from puncte3.cpp:4: /usr/include/c++/4.8/bits/unordered_set.h:534:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type std::unordered_set<_Value, _Hash, _Pred, _Alloc>::count(const key_type&) const [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_type = std::pair<int, int>] count(const key_type& __x) const ^ /usr/include/c++/4.8/bits/unordered_set.h:534:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}' puncte3.cpp:49:43: error: no matching function for call to 'std::unordered_set<std::pair<int, int>, PairHash>::insert(<brace-enclosed initializer list>)' vizitat.insert({x, ny}); ^ puncte3.cpp:49:43: note: candidates are: In file included from /usr/include/c++/4.8/unordered_set:48:0, from puncte3.cpp:4: /usr/include/c++/4.8/bits/unordered_set.h:344:7: note: std::pair<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator, bool> std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(const value_type&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(const value_type& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:344:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}' /usr/include/c++/4.8/bits/unordered_set.h:348:7: note: std::pair<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator, bool> std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type&&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(value_type&& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:348:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::unordered_set<std::pair<int, int>, PairHash>::value_type&& {aka std::pair<int, int>&&}' /usr/include/c++/4.8/bits/unordered_set.h:373:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator, const value_type&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator = std::__detail::_Node_const_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(const_iterator __hint, const value_type& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:373:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/bits/unordered_set.h:377:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator, std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type&&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator = std::__detail::_Node_const_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(const_iterator __hint, value_type&& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:377:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/bits/unordered_set.h:392:2: note: template<class _InputIterator> void std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >] insert(_InputIterator __first, _InputIterator __last) ^ /usr/include/c++/4.8/bits/unordered_set.h:392:2: note: template argument deduction/substitution failed: puncte3.cpp:49:43: note: candidate expects 2 arguments, 1 provided vizitat.insert({x, ny}); ^ In file included from /usr/include/c++/4.8/unordered_set:48:0, from puncte3.cpp:4: /usr/include/c++/4.8/bits/unordered_set.h:403:7: note: void std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::initializer_list<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type>) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type = std::pair<int, int>] insert(initializer_list<value_type> __l) ^ /usr/include/c++/4.8/bits/unordered_set.h:403:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::pair<int, int> >' puncte3.cpp:50:35: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)' q.push({x, ny}); ^ puncte3.cpp:50:35: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from puncte3.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<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = 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<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<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = 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<int, int> >::value_type&& {aka std::pair<int, int>&&}' puncte3.cpp:56:43: error: no matching function for call to 'std::unordered_set<std::pair<int, int>, PairHash>::count(<brace-enclosed initializer list>)' if (!vizitat.count({nx, y})) { ^ puncte3.cpp:56:43: note: candidate is: In file included from /usr/include/c++/4.8/unordered_set:48:0, from puncte3.cpp:4: /usr/include/c++/4.8/bits/unordered_set.h:534:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type std::unordered_set<_Value, _Hash, _Pred, _Alloc>::count(const key_type&) const [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_type = std::pair<int, int>] count(const key_type& __x) const ^ /usr/include/c++/4.8/bits/unordered_set.h:534:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}' puncte3.cpp:57:43: error: no matching function for call to 'std::unordered_set<std::pair<int, int>, PairHash>::insert(<brace-enclosed initializer list>)' vizitat.insert({nx, y}); ^ puncte3.cpp:57:43: note: candidates are: In file included from /usr/include/c++/4.8/unordered_set:48:0, from puncte3.cpp:4: /usr/include/c++/4.8/bits/unordered_set.h:344:7: note: std::pair<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator, bool> std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(const value_type&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(const value_type& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:344:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}' /usr/include/c++/4.8/bits/unordered_set.h:348:7: note: std::pair<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator, bool> std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type&&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(value_type&& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:348:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::unordered_set<std::pair<int, int>, PairHash>::value_type&& {aka std::pair<int, int>&&}' /usr/include/c++/4.8/bits/unordered_set.h:373:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator, const value_type&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator = std::__detail::_Node_const_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(const_iterator __hint, const value_type& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:373:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/bits/unordered_set.h:377:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator, std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type&&) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Node_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator = std::__detail::_Node_const_iterator<std::pair<int, int>, true, true>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = std::pair<int, int>] insert(const_iterator __hint, value_type&& __x) ^ /usr/include/c++/4.8/bits/unordered_set.h:377:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/4.8/bits/unordered_set.h:392:2: note: template<class _InputIterator> void std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >] insert(_InputIterator __first, _InputIterator __last) ^ /usr/include/c++/4.8/bits/unordered_set.h:392:2: note: template argument deduction/substitution failed: puncte3.cpp:57:43: note: candidate expects 2 arguments, 1 provided vizitat.insert({nx, y}); ^ In file included from /usr/include/c++/4.8/unordered_set:48:0, from puncte3.cpp:4: /usr/include/c++/4.8/bits/unordered_set.h:403:7: note: void std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::initializer_list<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type>) [with _Value = std::pair<int, int>; _Hash = PairHash; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type = std::pair<int, int>] insert(initializer_list<value_type> __l) ^ /usr/include/c++/4.8/bits/unordered_set.h:403:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::pair<int, int> >' puncte3.cpp:58:35: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)' q.push({nx, y}); ^ puncte3.cpp:58:35: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from puncte3.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<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = 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<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<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = 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<int, int> >::value_type&& {aka std::pair<int, int>&&}' puncte3.cpp: In function 'int main()': puncte3.cpp:82:5: error: 'cout' was not declared in this scope cout << numar_maxim_puncte_rosii(n, puncte) << endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema puncte3 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ă.