Borderou de evaluare (job #2257708)

Utilizator iulius510iulius alexandru iulius510 Data 10 octombrie 2018 13:40:55
Problema Subsir crescator maximal Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 45

Raport evaluator

Compilare: user.cpp: In function ‘void update(int, int)’: user.cpp:5:26: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses] #define zeros(x) (x^(x-1)&x) ~~~~~^~~~ ifstream f("scmax.in"); ~~~~~~~~~~~~~~~~~~~~~~~~ ofstream g("scmax.out"); ~~~~~~~~~~~~~~~~~~~~~~~~~ int n,sol[100001],p,rad,M,val[100001],d[100001],Max; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ struct element ~~~~~~~~~~~~~~~ { ~~ int val; ~~~~~~~~~ int ind; ~~~~~~~~~ }; ~~~ element v[100001],aib[100001]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bool cmp(struct element x,struct element y) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~~ return (x.val<y.val); ~~~~~~~~~~~~~~~~~~~~~~ } ~~ void update(int x,int val) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~~ d[x]+=val; ~~~~~~~~~~~ for(int i=x; i<=n; i+=zeros(i)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ user.cpp:22:27: note: in expansion of macro ‘zeros’ for(int i=x; i<=n; i+=zeros(i)) ^~~~~ user.cpp: In function ‘element calcul(int)’: user.cpp:5:26: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses] #define zeros(x) (x^(x-1)&x) ~~~~~^~~~ ifstream f("scmax.in"); ~~~~~~~~~~~~~~~~~~~~~~~~ ofstream g("scmax.out"); ~~~~~~~~~~~~~~~~~~~~~~~~~ int n,sol[100001],p,rad,M,val[100001],d[100001],Max;
Test Timp executie Memorie folosita Mesaj Punctaj/test Punctaj/grupa
10ms3384kbLungime incorecta!00
20ms3388kbSubsir incorect!55
30ms3384kbSubsir incorect!55
40ms3376kbSubsir incorect!55
50ms3380kbSubsir incorect!55
60ms3388kbSubsir incorect!55
70ms3388kbSubsir incorect!55
868ms3664kbSubsir incorect!515
952ms3668kbSubsir incorect!5
1068ms3664kbSubsir incorect!5
Punctaj total45

Ceva nu functioneaza?