kadalbonek

Untitled

Dec 16th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. http://codeforces.com/problemset/problem/322/B
  2. Ciel and Flowers
  3. time limit per test
  4. 1 second
  5. memory limit per test
  6. 256 megabytes
  7. input
  8. standard input
  9. output
  10. standard output
  11.  
  12. Fox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers to make several bouquets. There are 4 types of bouquets:
  13.  
  14. To make a "red bouquet", it needs 3 red flowers.
  15. To make a "green bouquet", it needs 3 green flowers.
  16. To make a "blue bouquet", it needs 3 blue flowers.
  17. To make a "mixing bouquet", it needs 1 red, 1 green and 1 blue flower.
  18.  
  19. Help Fox Ciel to find the maximal number of bouquets she can make.
  20. Input
  21.  
  22. The first line contains three integers r, g and b (0 ≤ r, g, b ≤ 109) — the number of red, green and blue flowers.
  23. Output
  24.  
  25. Print the maximal number of bouquets Fox Ciel can make.
  26. Sample test(s)
  27. Input
  28.  
  29. 3 6 9
  30.  
  31. Output
  32.  
  33. 6
  34.  
  35. Input
  36.  
  37. 4 4 4
  38.  
  39. Output
  40.  
  41. 4
  42.  
  43. Input
  44.  
  45. 0 0 0
  46.  
  47. Output
  48.  
  49. 0
  50.  
  51. Note
  52.  
  53. In test case 1, we can make 1 red bouquet, 2 green bouquets and 3 blue bouquets.
  54.  
  55. In test case 2, we can make 1 red, 1 green, 1 blue and 1 mixing bouquet.
Advertisement
Add Comment
Please, Sign In to add comment