Job 19977

Owner
Posdarascu Eugenie Daniel
Problem
CC
Contest
MindCoding 2017 Round 4 Bitdefender (Div. 1)
Source
0.99KB
Result
Accepted

Compiler output

prog.cpp: In function 'void update(int, int)':
prog.cpp:18:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
     for(;poz<=n;poz+=poz^(poz-1)&poz)
                                 ^
prog.cpp: In function 'int query(int)':
prog.cpp:25:30: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
     for(;poz;poz-=poz^(poz-1)&poz)
                              ^

Results

Test numberResultTime
1Ok0.5821s
2Ok0.5257s
3Ok0.5132s
4Ok0.5139s
5Ok0.5269s
6Ok0.7025s
7Ok0.6698s
8Ok0.6422s
9Ok0.5828s
10Ok0.6029s
Questions?

Sponsors Gold