Loading...
Peak the Color Game
Time: 1 s
Memory: 125 MB
In the Shohoj Coding Central Jail, there are N criminals.
On a festival day, the jailer Kausar Babu decides to free some of them by playing a special game called Peak the Color Game.

The Game Rules:
  • Each criminal will be given a cap, either Black or White.
  • A criminal can be released if he correctly guesses the color of his own cap.
  • No criminal can see his own cap.
  • After the game starts, no one is allowed to talk to each other — they can only answer “Black” or “White” when asked.
  • The criminals will stand in a line:
                    - The last criminal in the line can see everyone in front of him.
                    - The first criminal in the line cannot see anyone (he is looking forward).
  • Before the game starts, the jailer gives them a chance to discuss a strategy.

If it is guaranteed that at least K criminals can always be released, print 1.Otherwise, print 0.
Input
A single line containing two integers: N K
Constraint
\(1 ≤ K ≤ N\)
\(1 ≤ N ≤ 10^{18}\)
Output
If it is guaranteed that at least K criminals can always be released, print 1. Otherwise, print 0.
Examples
Input
Output
20 6
1
Input
Output
2 2
0
Problem Info
Problem ID 607
Time Limit 1000 ms
Memory Limit 128000 KB
Moderators Shohoj_Coding , Zoror
Statistics
Submit
You need to Login or Registration for submit your solution