This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
long long onesFromTo(long long a,long long b){// counts number of ones for a>=0 and b>=0 and a<=b | |
long long right = 0,count = 0,countedb = 0,counteda = 0,lastbitb = 0,lastbita = 0; |