← All problemsSign in

Big Number

CodeChefRating 2737Open on judge ↗

Given a binary represantation of number N. You are to find how many numbers from 0 to N have even number of ones in their binary represantation. There is also an update operation, update (L,R), which means that all bits of N from Lth to Rth are flipped, i.e. ones to zeroes and vice versa. You have to also find the answer after each of these updates. Input The first line of input file contains

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start