لینک‌های مفید برای شرکت در مسابقه:

در طول مسابقه، می‌توانید سؤالات خود را از قسمت «سؤال بپرسید» مطرح کنید.

G – Grid Filter


  • محدودیت زمان: ۱ ثانیه
  • محدودیت حافظه: ۲۵۶ مگابایت

There is company producing random sized triangular shaped biscuits. Since the technique of making such biscuits is very complicated, the minimum size of produced biscuits is out of control. The owners know that it’s annoying for the customers to find lots of tiny pieces in their biscuit packs, so, they want to add a filtering module in their production line. In the filtering module, there is a rolling belt which all the biscuits are put there and scanned by a camera before being redirected to the filtering grid. In this stage, the camera detects the number of triangles and dimension of each. The filtering grid has an adjustment system which can change the size of the squares of the grid filter.

توضیح تصویر

For more accuracy in filtering, the grid has a harsh vibrating motion causing the biscuits being popped up and rotate in all possible directions. This will happen long enough and you can be sure the triangles will fall on the grid in almost all possible orientations.

توضیح تصویر

The owners want you to write a program in order to adjust the grid size in such a way that for a threshold percentage of PP and acceptable error of EE, only P±EP±E percent of the biscuit pieces remain on the grid to be packed and the others fall through the grid holes to be recycled.

ورودی🔗

First line of input begins what in integer TT indicating number of test cases to follow.

1T201 \leq T \leq 20

Each test case begins with three space separated integers N,PN, P and EE representing number of biscuits, threshold, and acceptable error respectively.

1N1051 \leq N \leq 10^5 0<P,E<100,100>P±E>00 \lt P, E \lt 100, \quad \quad 100 \gt P ± E \gt 0

Following NN lines each contain 33 space separated real numbers a,ba, b and cc indicating dimensions of each triangle.

0<a,b,c<1090 \lt a, b, c \lt 10^9.

خروجی🔗

For each test case, print out the minimum size of square edges to be set in such a way that P±EP±E percent of the biscuits remain on the filter rounded in 22 digits after floating point. Note that if a range of size satisfies the condition, print the minimum and assume that a biscuit having an exact match dimensions with the squares will fall. If the condition can’t be satisfied print IMPOSSIBLE.

مثال‌ها🔗

ورودی نمونه ۱🔗

2
5 70 10
1.5 2 2.5
2 2 2
7.5 8 10
5 6 7
3 3 3
3 50 20
5.5 5.5 5.5
5.5 5.5 5.5
5.5 5.5 5.5
Plain text

خروجی نمونه ۱🔗

1.22
IMPOSSIBLE
Plain text
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.