#4065
Big Data
Se dă o listă de N
numere naturale, indexată de la 1
la N
, și Q
query-uri de forma op
poz
, unde op
= 1
, 2
este tipul operației.
Cele 2 operații sunt:
op
= 1
: se șterge din listă elementul aflat pe poziția poz
op
= 2
: se afișează elementul din listă aflat pe poziția poz
Problema | Big Data | Operații I/O |
bigdata.in /bigdata.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 4 MB
|
Id soluție | #55093036 | Utilizator | |
Fișier | big_data.cpp | Dimensiune | 1.06 KB |
Data încărcării | 22 Decembrie 2024, 15:07 | Scor / rezultat | Eroare de compilare |
big_data.cpp: In function 'int main()': big_data.cpp:41:22: error: no matching function for call to 'get(int&)' inc(get(i),n); ^ big_data.cpp:41:22: note: candidates are: big_data.cpp:23:5: note: int get(int, int) int get(int i, int n){ ^ big_data.cpp:23:5: note: candidate expects 2 arguments, 1 provided In file included from /usr/include/c++/4.8/unordered_map:41:0, from big_data.cpp:3: /usr/include/c++/4.8/tuple:773:5: note: template<unsigned int __i, class ... _Elements> constexpr typename std::__add_r_ref<typename std::tuple_element<__i, std::tuple<_Elements ...> >::type>::type std::get(std::tuple<_Elements ...>&&) get(tuple<_Elements...>&& __t) noexcept ^ /usr/include/c++/4.8/tuple:773:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'std::tuple<_Elements ...>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/unordered_map:41:0, from big_data.cpp:3: /usr/include/c++/4.8/tuple:766:5: note: template<unsigned int __i, class ... _Elements> constexpr typename std::__add_c_ref<typename std::tuple_element<__i, std::tuple<_Elements ...> >::type>::type std::get(const std::tuple<_Elements ...>&) get(const tuple<_Elements...>& __t) noexcept ^ /usr/include/c++/4.8/tuple:766:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'const std::tuple<_Elements ...>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/unordered_map:41:0, from big_data.cpp:3: /usr/include/c++/4.8/tuple:759:5: note: template<unsigned int __i, class ... _Elements> constexpr typename std::__add_ref<typename std::tuple_element<__i, std::tuple<_Elements ...> >::type>::type std::get(std::tuple<_Elements ...>&) get(tuple<_Elements...>& __t) noexcept ^ /usr/include/c++/4.8/tuple:759:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'std::tuple<_Elements ...>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/unordered_map:41, from big_data.cpp:3: /usr/include/c++/4.8/array:285:5: note: template<unsigned int _Int, class _Tp, unsigned int _Nm> constexpr const _Tp& std::get(const std::array<_Tp, _Nm>&) get(const array<_Tp, _Nm>& __arr) noexcept ^ /usr/include/c++/4.8/array:285:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'const std::array<_Tp, _Nm>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/unordered_map:41, from big_data.cpp:3: /usr/include/c++/4.8/array:277:5: note: template<unsigned int _Int, class _Tp, unsigned int _Nm> constexpr _Tp&& std::get(std::array<_Tp, _Nm>&&) get(array<_Tp, _Nm>&& __arr) noexcept ^ /usr/include/c++/4.8/array:277:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'std::array<_Tp, _Nm>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/unordered_map:41, from big_data.cpp:3: /usr/include/c++/4.8/array:268:5: note: template<unsigned int _Int, class _Tp, unsigned int _Nm> constexpr _Tp& std::get(std::array<_Tp, _Nm>&) get(array<_Tp, _Nm>& __arr) noexcept ^ /usr/include/c++/4.8/array:268:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'std::array<_Tp, _Nm>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/unordered_map:38:0, from big_data.cpp:3: /usr/include/c++/4.8/utility:152:5: note: template<unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&) get(const std::pair<_Tp1, _Tp2>& __in) noexcept ^ /usr/include/c++/4.8/utility:152:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'const std::pair<_Tp1, _Tp2>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/unordered_map:38:0, from big_data.cpp:3: /usr/include/c++/4.8/utility:147:5: note: template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&) get(std::pair<_Tp1, _Tp2>&& __in) noexcept ^ /usr/include/c++/4.8/utility:147:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'std::pair<_Tp1, _Tp2>' and 'int' inc(get(i),n); ^ In file included from /usr/include/c++/4.8/unordered_map:38:0, from big_data.cpp:3: /usr/include/c++/4.8/utility:142:5: note: template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&) get(std::pair<_Tp1, _Tp2>& __in) noexcept ^ /usr/include/c++/4.8/utility:142:5: note: template argument deduction/substitution failed: big_data.cpp:41:22: note: mismatched types 'std::pair<_Tp1, _Tp2>' and 'int' inc(get(i),n); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Big Data 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ă.