Originally Posted by

**SlipEternal** In the line, consider pairs of positions that are exactly $r+1$ apart. For example, $(1,r+2)$ has exactly $r$ people between them. This is also true for $(2,r+3),(3,r+4), \ldots , (n-r-1,n)$ So, if $r>n-2$, then the answer is zero. Otherwise, there are $n-r-1$ different pairs of positions that yield exactly $r$ people between them. Choose a pair of positions. Now, you have two men, so choose a man to go into the leftmost position (the other one will go into the other position. Finally, fill the remaining positions. $(n-r-1)2!(n-2)!$