Detalii evaluare #58074768

Rezumat problemă

Se dau n numere naturale. Să se verifice despre fiecare dacă este termen al şirului lui Fibonacci.

Detalii

Problema FiboVerif Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #58074768 Utilizator Lefterache Matei (mateiut7472)
Fișier fiboverif.cpp Dimensiune 631 B
Data încărcării 12 Mai 2025, 20:58 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

In file included from /usr/include/c++/4.8/bits/hashtable.h:35:0,
                 from /usr/include/c++/4.8/unordered_map:47,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:115,
                 from fiboverif.cpp:1:
/usr/include/c++/4.8/bits/hashtable_policy.h: In instantiation of 'struct std::__detail::__is_noexcept_hash<int, bool>':
/usr/include/c++/4.8/type_traits:121:12:   recursively required from 'struct std::__and_<std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> >'
/usr/include/c++/4.8/type_traits:121:12:   required from 'struct std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> >'
/usr/include/c++/4.8/type_traits:127:38:   required from 'struct std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
/usr/include/c++/4.8/bits/unordered_set.h:95:63:   required from 'class std::unordered_set<int, bool>'
fiboverif.cpp:5:30:   required from here
/usr/include/c++/4.8/bits/hashtable_policy.h:85:33: error: expression cannot be used as a function
  noexcept(declval<const _Hash&>()(declval<const _Key&>()))>
                                 ^
In file included from /usr/include/c++/4.8/bits/move.h:57:0,
                 from /usr/include/c++/4.8/bits/stl_pair.h:59,
                 from /usr/include/c++/4.8/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/sstream:38,
                 from /usr/include/c++/4.8/complex:45,
                 from /usr/include/c++/4.8/ccomplex:38,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52,
                 from fiboverif.cpp:1:
/usr/include/c++/4.8/type_traits: In instantiation of 'struct std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >':
/usr/include/c++/4.8/bits/unordered_set.h:95:63:   required from 'class std::unordered_set<int, bool>'
fiboverif.cpp:5:30:   required from here
/usr/include/c++/4.8/type_traits:127:38: error: 'value' is not a member of 'std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> >'
     : public integral_constant<bool, !_Pp::value>
                                      ^
In file included from /usr/include/c++/4.8/unordered_set:48:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116,
                 from fiboverif.cpp:1:
/usr/include/c++/4.8/bits/unordered_set.h: In instantiation of 'class std::unordered_set<int, bool>':
fiboverif.cpp:5:30:   required from here
/usr/include/c++/4.8/bits/unordered_set.h:95:63: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc>  _Hashtable;
                                                               ^
/usr/include/c++/4.8/bits/unordered_set.h:102:45: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::key_type key_type;
                                             ^
/usr/include/c++/4.8/bits/unordered_set.h:103:47: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::value_type value_type;
                                               ^
/usr/include/c++/4.8/bits/unordered_set.h:104:43: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::hasher hasher;
                                           ^
/usr/include/c++/4.8/bits/unordered_set.h:105:46: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::key_equal key_equal;
                                              ^
/usr/include/c++/4.8/bits/unordered_set.h:106:51: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::allocator_type allocator_type;
                                                   ^
/usr/include/c++/4.8/bits/unordered_set.h:115:46: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::iterator  iterator;
                                              ^
/usr/include/c++/4.8/bits/unordered_set.h:116:51: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::const_iterator const_iterator;
                                                   ^
/usr/include/c++/4.8/bits/unordered_set.h:117:51: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::local_iterator local_iterator;
                                                   ^
/usr/include/c++/4.8/bits/unordered_set.h:118:57: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::const_local_iterator const_local_iterator;
                                                         ^
/usr/include/c++/4.8/bits/unordered_set.h:119:47: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::size_type  size_type;
                                               ^
/usr/include/c++/4.8/bits/unordered_set.h:120:52: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       typedef typename _Hashtable::difference_type difference_type;
                                                    ^
/usr/include/c++/4.8/bits/unordered_set.h:206:7: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       operator=(initializer_list<value_type> __l)
       ^
/usr/include/c++/4.8/bits/unordered_set.h:300:2: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
  emplace(_Args&&... __args)
  ^
/usr/include/c++/4.8/bits/unordered_set.h:344:7: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       insert(const value_type& __x)
       ^
/usr/include/c++/4.8/bits/unordered_set.h:348:7: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       insert(value_type&& __x)
       ^
/usr/include/c++/4.8/bits/unordered_set.h:403:7: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       insert(initializer_list<value_type> __l)
       ^
/usr/include/c++/4.8/bits/unordered_set.h:547:7: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       equal_range(const key_type& __x)
       ^
/usr/include/c++/4.8/bits/unordered_set.h:551:7: error: 'value' is not a member of 'std::__not_<std::__and_<std::__is_fast_hash<bool>, std::is_default_constructible<bool>, std::is_copy_assignable<bool>, std::__detail::__is_noexcept_hash<int, bool> > >'
       equal_range(const key_type& __x) const
       ^
fiboverif.cpp: In function 'int main()':
fiboverif.cpp:5:30: error: no matching function for call to 'std::unordered_set<int, bool>::unordered_set()'
     unordered_set<int, bool> fibs;

                              ^
fiboverif.cpp:5:30: note: candidates are:
In file included from /usr/include/c++/4.8/unordered_set:48:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116,
                 from fiboverif.cpp:1:
/usr/include/c++/4.8/bits/unordered_set.h:165:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(std::unordered_set<_Value, _Hash, _Pred, _Alloc>&&) [with _Value = int; _Hash = bool; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>]
       unordered_set(unordered_set&&) = default;
       ^
/usr/include/c++/4.8/bits/unordered_set.h:165:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/4.8/bits/unordered_set.h:162:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(const std::unordered_set<_Value, _Hash, _Pred, _Alloc>&) [with _Value = int; _Hash = bool; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>]
       unordered_set(const unordered_set&) = default;
       ^
/usr/include/c++/4.8/bits/unordered_set.h:162:7: note:   candidate expects 1 argument, 0 provided
fiboverif.cpp:7:18: error: no matching function for call to 'std::unordered_set<int, bool>::insert(long long int&)'
     fibs.insert(a);

                  ^
fiboverif.cpp:7:18: note: candidate is:
In file included from /usr/include/c++/4.8/unordered_set:48:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116,
                 from fiboverif.cpp:1:
/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 = int; _Hash = bool; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>]
  insert(_InputIterator __first, _InputIterator __last)
  ^
/usr/include/c++/4.8/bits/unordered_set.h:392:2: note:   template argument deduction/substitution failed:
fiboverif.cpp:7:18: note:   candidate expects 2 arguments, 1 provided
     fibs.insert(a);

                  ^
fiboverif.cpp:8:18: error: no matching function for call to 'std::unordered_set<int, bool>::insert(long long int&)'
     fibs.insert(b);

                  ^
fiboverif.cpp:8:18: note: candidate is:
In file included from /usr/include/c++/4.8/unordered_set:48:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116,
                 from fiboverif.cpp:1:
/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 = int; _Hash = bool; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>]
  insert(_InputIterator __first, _InputIterator __last)
  ^
/usr/include/c++/4.8/bits/unordered_set.h:392:2: note:   template argument deduction/substitution failed:
fiboverif.cpp:8:18: note:   candidate expects 2 arguments, 1 provided
     fibs.insert(b);

                  ^
fiboverif.cpp:15:22: error: no matching function for call to 'std::unordered_set<int, bool>::insert(long long int&)'
         fibs.insert(c);

                      ^
fiboverif.cpp:15:22: note: candidate is:
In file included from /usr/include/c++/4.8/unordered_set:48:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116,
                 from fiboverif.cpp:1:
/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 = int; _Hash = bool; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>]
  insert(_InputIterator __first, _InputIterator __last)
  ^
/usr/include/c++/4.8/bits/unordered_set.h:392:2: note:   template argument deduction/substitution failed:
fiboverif.cpp:15:22: note:   candidate expects 2 arguments, 1 provided
         fibs.insert(c);

                      ^
fiboverif.cpp:24:18: error: 'class std::unordered_set<int, bool>' has no member named 'find'
         if (fibs.find(num) != fibs.end()) {

                  ^
fiboverif.cpp:24:36: error: 'class std::unordered_set<int, bool>' has no member named 'end'
         if (fibs.find(num) != fibs.end()) {

                                    ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema FiboVerif face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.