# DCP-393: Maximum Average Back to All Problems

You will be given an array of **N** integers. You have to select a contiguous sub-array whose **Average** is maximum and print that maximum average. Average = (sum of the elements / number of elements) **Note : It is guaranteed that the answer will always be an integer.** Input: ------ Input starts with an integer **T (1≤ T≤ 10)**, denoting the number of test cases. Each case contain an integer **N ( 1≤ N ≤100000)**. The next line contains **N** space separated **signed 32-bit integers** denoting the elements of the array. Output: ------- For each test case print the **maximum average value** of the sub-array. Sample Input ------------ 2 2 7 -5 3 1 1 1 Sample Output ------------- 7 1

### Problem Limits

 Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 2.00 Go 2.00 Java 2.00 JavaScript 2.00 Objective-C 2.00 Perl 2.00 PHP 2.00 Python 2.00 Python3 2.00 Ruby 2.00 VB.Net 2.00

# 32/86

Solve/Submission

### Ranking

# User Language Timing
01 feodorv C 0.04s
02 Morass Cpp14 0.05s
03 MRoy Cpp 0.09s
04 indroneel Cpp14 0.09s
05 anik_JU Cpp 0.09s
06 touhidur Cpp14 0.09s
07 Fahim_41 C 0.11s
08 rayhan50001 Cpp 0.11s
10 dipta007 Cpp 0.12s
11 sazal_dev Cpp 0.12s
12 Trusted_Frustrated Cpp14 0.12s
13 belal_mbstu Cpp14 0.12s
15 BishalG Cpp 0.12s
16 mahbubcseju Cpp 0.12s
17 emrul Cpp 0.12s