P*b
1 楼
Given a deck of nCards unique cards, cut the deck iCut cards from top and pe
rform a perfect shuffle. A perfect shuffle begins by putting down the bottom
card from the top portion of the deck followed by the bottom card from the
bottom portion of the deck followed by the next card from the top portion, e
tc., alternating cards until one portion is used up. The remaining cards go
on top. The problem is to find the number of perfect shuffles required to re
turn the deck to its original order. Your
rform a perfect shuffle. A perfect shuffle begins by putting down the bottom
card from the top portion of the deck followed by the bottom card from the
bottom portion of the deck followed by the next card from the top portion, e
tc., alternating cards until one portion is used up. The remaining cards go
on top. The problem is to find the number of perfect shuffles required to re
turn the deck to its original order. Your