시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 2 | 2 | 2 | 100.000% |
Maj loves pickled cucumber (also known as pickles). However, her partner is not as keen on filling a sandwich with pickles. Maj would like to maximize the amount of pickles on a sandwich, while still avoiding being judged by her partner.
Both Maj's sandwich and the pickles have a circular shape. The sandwich has radius $s$ cm and the pickles have radius $r$ cm.
Maj has exactly $n$ pickles. She wants to place as many of them as possible on her sandwich, as long as:
How many pickles can Maj place on her sandwich?
The input consists of:
Output the maximum number of pickles Maj can place on her sandwich. The input will always be constructed such that this number does not change if the radius of the sandwich increases or decreases by $10^{-6}$.
3 1 4 40
3
3 1 4 100
4
Contest > Swedish Coding Cup > LTH Challenge 2017 C번