Greedy Takahashi——UPC
题目描述
Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:
·If Takahashi has one or more cookies, eat one of his cookies.
·Otherwise, if Aoki has one or more cookies, eat one of Aoki’s cookies.
·If they both have no cookies, do nothing.