Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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+1...N-])
  5.     for (int B = 1; B < N - 1; B++) {
  6.         //here the values are "current
  7.  
  8.         //and here they are being prepared for the next iteration
  9.         ProfitB = ProfitB + array[A+B-1];
  10.         ProfitC = ProfitC + array[A+B]);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement