coding in c X girls and Y boys are standing in a line. If too many girls stand together, they will start fighting
with each other. Similarly, if too many boys stand together, they will start fighting with each
other. You are their new Physical Education teacher and you want to minimize the chances of
them fighting. Hence, you have decided to rearrange them such that maximum number of
boys/girls standing together is minimum.
For Example: If there are 5 girls and 1 boy standing, then, 3 girls (at least) will be standing
together at any cost.
Input
* Two numbers X and Y representing number of girls and number of
boys.
Output
* Single integer representing maximum of (maximum number of boys
or maximum number of girls) standing together in an optimal arran
gement.
Constraints
1<=X,Y<=1000
Answers
Answered by
3
Answer:
wow
i have neever seen such long ques
Similar questions