Borderou de evaluare (job #1588323)

Utilizator oldatlantianSerban Cercelescu oldatlantian Data 2 februarie 2016 22:59:06
Problema Logic Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 90

Raport evaluator

Compilare: user.cpp: In function ‘bool eval(char*)’: user.cpp:26:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/') ^ user.cpp:32:49: warning: array subscript has type ‘char’ [-Wchar-subscripts] while(ops.top()!='(' && pr[ops.top()]>=pr[op]){ ^ user.cpp:32:57: warning: array subscript has type ‘char’ [-Wchar-subscripts] while(ops.top()!='(' && pr[ops.top()]>=pr[op]){ ^ user.cpp:57:49: warning: array subscript has type ‘char’ [-Wchar-subscripts] while(ops.top()!='(' && pr[ops.top()]>=pr[op]){ ^ user.cpp:57:57: warning: array subscript has type ‘char’ [-Wchar-subscripts] while(ops.top()!='(' && pr[ops.top()]>=pr[op]){ ^ user.cpp: In function ‘bool equala(int)’: user.cpp:101:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if(k==vars.size()){ ^ user.cpp: In function ‘int main()’: user.cpp:132:18: warning: passing NULL to non-pointer argument 1 of ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = char; _Tp = bool; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = bool; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = char]’ [-Wconversion-null] vars[NULL] = '\0'; ^ user.cpp:118:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("logic.in","r",stdin); ^ user.cpp:119:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("logic.out","w",stdout); ^ user.cpp:121:15: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(line); ^ user.cpp:135:21: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(expa+1); expa[0]='('; expa[l=strlen(expa)]=')'; expa[l+1]='\0'; ^ user.cpp:136:21: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(expb+1); expb[0]='('; expb[l=strlen(expb)]=')'; expb[l+1]='\0'; ^ /tmp/cc0SYvoS.o: In function `main': user.cpp:(.text.startup+0x64): warning: the `gets' function is dangerous and should not be used.
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms260kbOK10
24ms264kbOK10
30ms264kbOK10
44ms264kbOK10
572ms264kbOK10
60ms244kbKilled by signal 11(SIGSEGV).0
78ms264kbOK10
80ms264kbOK10
90ms268kbOK10
104ms264kbOK10
Punctaj total90

Ceva nu functioneaza?