Borderou de evaluare (job #2257800)

Utilizator iulius510iulius alexandru iulius510 Data 10 octombrie 2018 15:25:30
Problema Subsir crescator maximal Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 90

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) //adaugam val pe pozitia x, si inoim arborele indexat binar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { ~~ 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
10ms3396kbLungime incorecta!00
20ms3524kbCorect!1010
30ms3384kbCorect!1010
40ms3384kbCorect!1010
50ms3388kbCorect!1010
60ms3400kbCorect!1010
70ms3396kbCorect!1010
872ms4084kbCorect!1030
952ms4056kbCorect!10
1072ms4088kbCorect!10
Punctaj total90

Ceva nu functioneaza?