SRM 552 div2

Source: Internet
Author: User

250pt water question

 

500pt

In two cases, 1. The minimum value in RGB is large enough. The constraint is the value of R + G + B. In this case, the result is (R + G + B) /tot 2, R + G + B is large enough, and the constraint is that the minimum value in RGB is not large enough. In this case, the result is that M/C takes the minimum value.

In the first case, r = 7, G = 6, B = 6. The minimum value of 6 is enough to draw two triangles, but R + G + B = 19 is not enough to draw two triangles.

In the second case, r = 1000000000, G = 6, B = 6, r + G + B is enough to draw n multiple triangles, but G and B have only 6 triangles. A maximum of two triangles can be drawn.

/* Six lines of code from his sister !!! */Class foxpaintingbils {public: long themax (long R, long g, long B, int N) {ll T = LL (N) * LL (n + 1)/2; If (n = 1) return r + G + B; ll c = T/3; ll x = min (r, min (G, B); LL ans = min (R + G + B)/t, x/C); Return ans ;}};

 

 

1000 PT

No, continue reading

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.