/**
<p>Given an array which consists of non-negative integers and an integer <i>m</i>, you can split the array into <i>m</i> non-empty continuous subarrays. Write an algorithm to minimize the largest sum among these <i>m</i> subarrays.
</p>

<p><b>Note:</b><br />
If <i>n</i> is the length of array, assume the following constraints are satisfied:
<ul>
<li>1 &le; <i>n</i> &le; 1000</li>
<li>1 &le; <i>m</i> &le; min(50, <i>n</i>)</li>
</ul>
</p>

<p><b>Examples: </b>
<pre>
Input:
<b>nums</b> = [7,2,5,10,8]
<b>m</b> = 2

Output:
18

Explanation:
There are four ways to split <b>nums</b> into two subarrays.
The best way is to split it into <b>[7,2,5]</b> and <b>[10,8]</b>,
where the largest sum among the two subarrays is only 18.
</pre>
</p><p>给定一个非负整数数组和一个整数&nbsp;<em>m</em>，你需要将这个数组分成&nbsp;<em>m&nbsp;</em>个非空的连续子数组。设计一个算法使得这&nbsp;<em>m&nbsp;</em>个子数组各自和的最大值最小。</p>

<p><strong>注意:</strong><br />
数组长度&nbsp;<em>n&nbsp;</em>满足以下条件:</p>

<ul>
	<li>1 &le; <em>n</em> &le; 1000</li>
	<li>1 &le; <em>m</em> &le; min(50, <em>n</em>)</li>
</ul>

<p><strong>示例: </strong></p>

<pre>
输入:
<strong>nums</strong> = [7,2,5,10,8]
<strong>m</strong> = 2

输出:
18

解释:
一共有四种方法将<strong>nums</strong>分割为2个子数组。
其中最好的方式是将其分为<strong>[7,2,5]</strong> 和 <strong>[10,8]</strong>，
因为此时这两个子数组各自的和的最大值为18，在所有情况中最小。
</pre>
<p>给定一个非负整数数组和一个整数&nbsp;<em>m</em>，你需要将这个数组分成&nbsp;<em>m&nbsp;</em>个非空的连续子数组。设计一个算法使得这&nbsp;<em>m&nbsp;</em>个子数组各自和的最大值最小。</p>

<p><strong>注意:</strong><br />
数组长度&nbsp;<em>n&nbsp;</em>满足以下条件:</p>

<ul>
	<li>1 &le; <em>n</em> &le; 1000</li>
	<li>1 &le; <em>m</em> &le; min(50, <em>n</em>)</li>
</ul>

<p><strong>示例: </strong></p>

<pre>
输入:
<strong>nums</strong> = [7,2,5,10,8]
<strong>m</strong> = 2

输出:
18

解释:
一共有四种方法将<strong>nums</strong>分割为2个子数组。
其中最好的方式是将其分为<strong>[7,2,5]</strong> 和 <strong>[10,8]</strong>，
因为此时这两个子数组各自的和的最大值为18，在所有情况中最小。
</pre>
**/


class Solution {
    fun splitArray(nums: IntArray, m: Int): Int {
        
    }
}