Borderou de evaluare (job #1477812)
Utilizator | Data | 27 august 2015 02:18:15 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:11: error: ‘int index’ redeclared as different kind of symbol
int hash1,index=1,hash2,curr,a=107,ans;
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:48,
from user.cpp:1:
/usr/include/string.h:482:1: error: previous declaration of ‘const char* index(const char*, int)’
index (__const char *__s, int __c) __THROW
^
user.cpp: In function ‘int main()’:
user.cpp:12:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<pattern.size();i++){
^
user.cpp:15:14: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator*’
index=(index*a)%MOD1;
^
user.cpp:17:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0;j<pattern.size();j++)
^
user.cpp:23:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=pattern.size();j<text.size();j++)
^
user.cpp:25:48: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator*’
hash2=((hash2-(index*int(text[j-pattern.size()]))%MOD1+MOD1)*a+int(text[j]))%MOD1;
^
user.cpp:9:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("strmatch.in","r",stdin);
^
user.cpp:10:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("strmatch.out","w",stdout);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !