首页 > ACM题库 > HDU-杭电 > hdu 2277 Change the ball待解决[解题报告]C++
2014
01-04

hdu 2277 Change the ball待解决[解题报告]C++

Change the ball

问题描述 :

Garfield has three piles of balls, each pile has unique color of following: yellow, blue, and red. Now we also know Garfield has Y yellow balls, B blue balls, and R red balls. But Garfield just wants to change all the balls to one color. When he puts two balls of different color togather, the balls then change their colors automatically into the rest color. For instance, when Garfield puts a red one and a yellow one togather, the two balls immediately owns blue color, the same to other situations. But the rule doesn’t work when the two balls have the same color.
  Garfield is not able to estimate the minimal steps to achieve the aim. Can you tell him?

输入:

For each line, there are three intergers Y, B, R(1<=Y,B,R<=1000),indicate the number refered above.

输出:

For each line, there are three intergers Y, B, R(1<=Y,B,R<=1000),indicate the number refered above.

样例输入:

1 2 3
1 2 2

样例输出:

):
2