提示: 欢迎访问OurACM平台。
Problem 1690 Tree Planting Day

Accept: 18    Submit: 73
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

As is known to us all,3.12 is the Tree Planting Day.The FZUacmers plant trees every year .
This year they first dig n holes in a line,number from 1 to n.And they will plant k trees,the leader doesn't want to see that the number of holes between two trees is less than W.
Could you help the FZUacmers decide how many choices to plant the trees.
Suppose the the number of choices to plant the trees is ANS ,for ANS may be too large,so just output the last non-zero bit X,and the bit Y before X if Y doesn't exit,Y=0;

Input

There are multicases.given n,k,w.(1<=k,n<=10^6,0<=w<=10^6)

Output

Output "YX" in one line.if there is no choice to plant the trees,just output "impossible!".

Sample Input

3 1 1 1000000 500000 0 3 3 1

Sample Output

03 84 impossible!

Source

FOJ月赛-2009年3月--- zxb

Submit  Back  Status  Discuss