report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Yet another XOR problem - MarisaOJ: Marisa Online Judge

Yet another XOR problem

Time limit: 1000 ms
Memory limit: 256 MB
Given an integer $x$. Count the number of values $y$ that $L \le y \le R$ and $ x \oplus y \le S$. ### Input - A single line contains 4 integers $x, L, R, S$. ### Output - Print the number of satisfied numbers. ### Constraints - $1 \le x, L, R, S \le 10^{18}$. ### Example Input: ``` 3 2 7 5 ``` Output: ``` 4 ```
Digit DP
Unlucky number
Digit Sum
Divisible
Prime digit sum
Non-palindrome number
Yet another XOR problem
Taboo substring
Balanced number
Equation
Beautiful number
Constructing numbers
Topic
Dynamic Programming
Rating 1600
Solution (0) Solution