Borderou de evaluare (job #2928725)
Utilizator | Data | 23 octombrie 2022 18:57:43 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void makeprefix()':
main.cpp:12:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for(int i=1; i<pat.size(); ++i)
| ~^~~~~~~~~~~
main.cpp: In function 'void KMP()':
main.cpp:21:15: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
21 | if(strlen(pat)>strlen(s)) return ;
| ^~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/10/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:48,
from main.cpp:1:
/usr/include/string.h:385:35: note: initializing argument 1 of 'size_t strlen(const char*)'
385 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
main.cpp:21:27: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
21 | if(strlen(pat)>strlen(s)) return ;
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/10/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:48,
from main.cpp:1:
/usr/include/string.h:385:35: note: initializing argument 1 of 'size_t strlen(const char*)'
385 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
main.cpp:23:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | for(int i=0; i<s.size(); ++i)
| ~^~~~~~~~~
main.cpp:27:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | if(k==pat.size()-1) v.push_back(i-pat.size()+1),k=urm[k];
| ~^~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !