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

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

C – Shortest but Hardest


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

Let’s assume some definitions:

  1. Subarray: a non-empty continuous part of an array, eg. [1],[1], [2],[2], [3],[3], [1,2],[1, 2], [2,3],[2, 3], [1,2,3][1, 2, 3] are subarrays of array [1,2,3][1, 2, 3].
  2. Geometric mean: for a set of numbers x1,x2,,xnx_1, x_2, \dots, x_n the geometric mean is defined as x1.x2..xnn\sqrt[n]{x_1 . x_2 . \cdots . x_n}.

Array AA consists of nn non-negative integers. AA is given, you have to find a subarray with the minimum value of geometric mean.

ورودی🔗

The input consists one or more datasets. Integer tt at the first line indicates the number of datasets.

1t1001 \leq t \leq 100

In each dataset, there is one integer nn that shows the length of array AA, following nn integers will show the elements of AA.

1n1001 \leq n \leq 100 0Ai100000 \leq A_i \leq 10 \, 000

خروجی🔗

For each dataset, print only one number: the answer to the problem. Print the number with exactly two digits of precision.

مثال‌ها🔗

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

3
5
1 1 1 1 1
3
0 1 2
1
1000
Plain text

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

1.00
0.00
1000.00
Plain text
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.