UVa 127 "Accordian" Patience(二)

2015-11-21 01:06:41 · 作者: · 浏览: 25
???? }?
??????? for(p = l->next; p; p = p->next)?
??????? {?
??????????? top = p->top;?
??????????? ans[cnt++] = top;?
??????? }?
??????? if(cnt == 1)?
??????????? printf("%d pile remaining:", cnt);?
??????? else?
??????????? printf("%d piles remaining:", cnt);?
??????? for(i = cnt-1; i>-1; i--)?
??????????? printf(" %d", ans[i]);?
??????? printf("\n");?
??? }?
??? return 0;?
}?