A girl named Xenia has a cupboard that looks like an arc from
ahead. The arc is made of a semicircle with
radius

Xenia got lots of balloons for her birthday. The girl hates the
mess, so she wants to store the balloons in the cupboard. Luckily,
each balloon is a sphere with radius
.
Help Xenia calculate the maximum number of balloons she can put in
her cupboard.
You can say that a balloon is in the cupboard if you can't see any part of the balloon on the left or right view. The balloons in the cupboard can touch each other. It is not allowed to squeeze the balloons or deform them in any way. You can assume that the cupboard's walls are negligibly thin.
The single line contains two integers
Print a single integer — the maximum number of balloons Xenia can put in the cupboard.
1 1
3
1 2
5
2 1
2
#include
#include
#include
using namespace std;
int main()
{
}
Xenia aims to maximize the number of spherical balloons she can store in her cupboard-shaped arc. This involves strategic placement to ensure no part of the balloons is visible from the sides, considering the cupboard's dimensions and balloon sizes.
2729

被折叠的 条评论
为什么被折叠?



