a conveyor belt package ship port day daysThe ith package conveyor belt weight weightsi each day load ship package conveyor belt order give weight we load weight maximum weight capacity shipreturn weight capacity ship result package conveyor belt ship day day Example 1input weight 12345678910 day 5output 15explanation a ship capacity 15 minimum ship package 5 day like this1st day 1 2 3 4 52nd day 6 73rd day 84th day 95th day 10note cargo ship order give ship capacity 14 splitting package part like 2 3 4 5 1 6 7 8 9 10 allowedexample 2input weight 322414 day 3output 6explanation a ship capacity 6 minimum ship package 3 day like this1st day 3 22nd day 2 43rd day 1 4example 3input weight 12311 day 4Output 3Explanation1st day 12nd day 23rd day 34th day 1 1 constraints1 day weightslength 5 1041 weightsi 500