#2680
Poezie
Se citește un număr n
, și n
versuri dintr-o poezie. Fiecare vers ocupă un rând și conține litere mari și mici ale alfabetului englez, spații, și semne de punctuație . , ! ?
. Să se elimine din fiecare vers toate semnele de punctuație, mai puțin cel aflat la final.
Problema | Poezie | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54807571 | Utilizator | |
Fișier | poezie.cpp | Dimensiune | 515 B |
Data încărcării | 09 Decembrie 2024, 11:50 | Scor / rezultat | Eroare de compilare |
poezie.cpp: In function 'void eliminareSemne(char*)': poezie.cpp:7:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while(i<strlen(s)) ^ poezie.cpp: In function 'int main()': poezie.cpp:23:14: error: no matching function for call to 'get()' cin>>get(); ^ poezie.cpp:23:14: note: candidates are: In file included from /usr/include/c++/4.8/algorithm:60:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/algorithm:60:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/algorithm:60:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/functional:55, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/functional:55, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/functional:55, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/functional:55:0, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/functional:55:0, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^ In file included from /usr/include/c++/4.8/functional:55:0, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from poezie.cpp:1: /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: poezie.cpp:23:14: note: candidate expects 1 argument, 0 provided cin>>get(); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Poezie 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ă.