Borderou de evaluare (job #3245949)

Utilizator AndreiSorin26012001Cirpici Andrei Sorin AndreiSorin26012001 Data 1 octombrie 2024 11:09:14
Problema Potrivirea sirurilor Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:13:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 13 | for (int i = 1, j = 0; i < needle.size(); i++) | ~~^~~~~~~~~~~~~~~ main.cpp:25:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 25 | while (i < haystack.size()) | ~~^~~~~~~~~~~~~~~~~ main.cpp:30:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 30 | if (j == needle.size()) | ~~^~~~~~~~~~~~~~~~ main.cpp:40:36: error: no matching function for call to 'min(std::vector<int, std::allocator<int> >::size_type, long long unsigned int)' 40 | unsigned long long n = std::min(occurenceIndexes.size(), 1000ull); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/string:50, from /usr/include/c++/12.2.1/bits/locale_classes.h:40, from /usr/include/c++/12.2.1/bits/ios_base.h:41, from /usr/include/c++/12.2.1/ios:42, from /usr/include/c++/12.2.1/istream:38, from /usr/include/c++/12.2.1/fstream:38, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 230 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/12.2.1/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed: main.cpp:40:36: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'long long unsigned int') 40 | unsigned long long n = std::min(occurenceIndexes.size(), 1000ull); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/12.2.1/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed: main.cpp:40:36: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'long long unsigned int') 40 | unsigned long long n = std::min(occurenceIndexes.size(), 1000ull); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:41:25: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare] 41 | for (int ii = 0; ii < n; ii++) | ~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?