Help in greedy problem !!!!

Revision en1, by ayush29azad, 2021-09-23 09:28:40

Problem Link :

The problem seems easy but there are two cases . I am not able to get case 2 which is explained in the editorial .

Case 1: First take out max of mixed flowers whcih we can make and then make individual flowers. long long mixed = min(min(r,g),b); r = r- mixed; g = g-mixed; b= b- mixed; long long ans1 = (mixed) +(r/3)+(g/3)+(b/3);

but I am not able to get case 2. maximum of two cases will be my answer.

Please Help !!!!!!!


  Rev. Lang. By When Δ Comment
en1 English ayush29azad 2021-09-23 09:28:40 554 Initial revision (published)