SHOW:
|
|
- or go back to the newest paste.
1 | for (int A = 1; A < N - 2; A++) { | |
2 | int ProfitA = Sum(array[0...A-1]); | |
3 | int ProfitB = array[A]; | |
4 | int ProfitC = Sum(array[A...N]) | |
5 | for (int B = 1; B < N - 1; B++) { | |
6 | - | int ProfitC = Sum(array[A+B...N-1]); |
6 | + | |
7 | ProfitC = ProfitC + array[A+B]); | |
8 | } | |
9 | } |