Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
CP WCC - Pascal version of Largest possible sum of consecutive numbersLargest possible sum of consecutive numbers =========================================== For [ ] there are no sets For [ -1 -2 -5 -4 -5 -1 -2 -11 ] there are no sets For [ 1 2 5 4 5 1 2 11 ] there is one set ... the largest group is [ 1 2 5 4 5 1 2 11 ] with a sum of 31 For [ 1 2 -5 4 5 -1 2 -11 ] there is one set ... the largest group is [ 4 5 -1 2 ] with a sum of 10 For [ 1 2 4 -20 4 2 1 -15 3 2 2 ] there are multiple sets ... the largest group is [ 1 2 4 ] with a sum of 7 ... the largest group is [ 4 2 1 ] with a sum of 7 ... the largest group is [ 3 2 2 ] with a sum of 7 For [ 5 -5 5 -10 5 -5 5 ] there are multiple sets ... the largest group is [ 5 -5 5 ] with a sum of 5 ... the largest group is [ 5 -5 5 ] with a sum of 5 For [ 5 -5 5 -5 5 ] there is one set ... the largest group is [ 5 -5 5 -5 5 ] with a sum of 5 For [ 5 5 -5 -6 ] there is one set ... the largest group is [ 5 5 ] with a sum of 10 |
λ
.NET NoSQL database for rapid development
|