Borderou de evaluare (job #1696052)

Utilizator testsursaSurseTest testsursa Data 28 aprilie 2016 12:38:04
Problema Swap Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 20

Raport evaluator

Compilare: user.cpp: In function ‘void add(int)’: user.cpp:3:21: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses] #define UB(i) ( (i) & ((i)-1)^(i)) ^ user.cpp:38:18: note: in expansion of macro ‘UB’ for(;x<=n;x+=UB(x)) aib[x]++; ^ user.cpp: In function ‘int query(int)’: user.cpp:3:21: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses] #define UB(i) ( (i) & ((i)-1)^(i)) ^ user.cpp:43:15: note: in expansion of macro ‘UB’ for(;x;x-=UB(x)) s+=aib[x]; ^ user.cpp: In function ‘int main()’: user.cpp:55:18: warning: array subscript has type ‘char’ [-Wchar-subscripts] cat1[a[i]][0]++; ^ user.cpp:57:15: warning: array subscript has type ‘char’ [-Wchar-subscripts] A[a[i]][cat1[a[i]][0]]=i; ^ user.cpp:57:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] A[a[i]][cat1[a[i]][0]]=i; ^ user.cpp:61:18: warning: array subscript has type ‘char’ [-Wchar-subscripts] cat2[b[i]][0]++; ^ user.cpp:62:22: warning: array subscript has type ‘char’ [-Wchar-subscripts] aux=cat2[b[i]][0]; ^ user.cpp:63:31: warning: array subscript has type ‘char’ [-Wchar-subscripts] x[i]=v[i].first=A[b[i]][aux]; ^ user.cpp:48:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("swap.in","r",stdin); ^ user.cpp:49:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("swap.out","w",stdout); ^ user.cpp:50:14: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(a+1); ^ user.cpp:51:14: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(b+1); ^ /tmp/ccoCoIag.o: In function `main': user.cpp:(.text.startup+0x56): warning: the `gets' function is dangerous and should not be used.
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms832kbOK10
20ms816kbOK10
30ms868kbIncorect0
40ms1152kbIncorect0
54ms1276kbIncorect0
68ms1540kbIncorect0
78ms1604kbIncorect0
88ms1604kbIncorect0
98ms1568kbIncorect0
108ms1784kbIncorect0
Punctaj total20

Ceva nu functioneaza?