题目盗链:http://sicily.3322.org/sicily/show_problem.php?pid=1003
#include<stdio.h>
#define  NUM   52
#define  N     10
int card[N+2][NUM+1],stack[N+1];//stack[]存放每个玩家最后移掉的牌
/*
 *card[i][]一次存放第i+1个玩家的牌(自顶上下存放),暴力搜搜,如果经历一次遍历(NUM
 *次)没有一张牌被move掉,则说明,任务不可能完成,此时返回0
 *currentPlay--当前玩家号,playNum--玩家总数
 */
int rollPlay(int card[N+1][NUM+1],int currentPlay,int playNum)
{
    int i,j,k,flag=0,count;
    count=0;
    k=0;
    while(count<NUM)                //count计数已被moved的牌数
    {
        flag=0;                     //flag标记一次轮回有没牌move掉,是则为1,否则0
        j=1;                        //j为循环计数器,1~13一个轮回
        for(i=0;i<NUM;i++)
        {
            if(j>13)
            {
                j=1;
            }
            if(card[currentPlay][i])     //该牌还没被moved掉
            { 
                if(j==card[currentPlay][i]) //满足相等条件,move掉
                {
                    flag=1;
                    card[currentPlay][i]=0;
                    card[currentPlay+1][k++]=j;//move掉的牌发给下个玩家,继续
                    stack[currentPlay]=j;
                    count++;
                }
                j++;
            }
        }
        if(!flag)
        {
            break;
        }
    }
    return flag;
}
int main(void)
{
    int cases,playerNum,i,j,NO=1,flag;
    scanf("%d",&cases);
    while(cases--)
    {
        scanf("%d",&playerNum);
        for(i=0;i<NUM;i++)
        {
            scanf("%d",&card[0][i]);
        }
        flag=1;
        for(i=0;i<playerNum;i++)
        {
            if(!rollPlay(card,i,playerNum))
            {
                flag=0;
                break;
            }
        }
        printf("Case %d: ",NO++);
        if(flag)
        {
            for(i=0;i<playerNum;i++)
            {
                printf("%d",stack[i]);
                if(i^(playerNum-1))
                {
                    printf(" ");
                }
                else
                {
                    printf("\n");
                }
            }
        }
        else
        {
            printf("unwinnable\n");
        }
    }
    return 0;
}
暴力错在哪?????恳高手赐教~~~~