Job 19954

Owner
Banu Denis
Problem
CC
Contest
MindCoding 2017 Round 4 Bitdefender (Div. 1)
Source
0.91KB
Result
Accepted

Compiler output

prog.cpp: In function 'void add(int, int)':
prog.cpp:14:25: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
 #define zeros(x) x^(x-1)&x
                         ^
prog.cpp:24:31: note: in expansion of macro 'zeros'
     for (int i=poz;i<=Nmax;i+=zeros(i))
                               ^
prog.cpp: In function 'int sum(int)':
prog.cpp:14:25: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
 #define zeros(x) x^(x-1)&x
                         ^
prog.cpp:30:28: note: in expansion of macro 'zeros'
     for (int i=poz;i>=1;i-=zeros(i))
                            ^

Results

Test numberResultTime
1Ok0.5342s
2Ok0.5166s
3Ok0.5260s
4Ok0.6092s
5Ok0.6099s
6Ok1.0244s
7Ok0.9074s
8Ok0.9321s
9Ok0.9236s
10Ok0.9640s
Questions?

Sponsors Gold