Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void assemblyTime(int a[][], int t[][], int e[], int x[], int len, int route[][]) {
- int first = e[0] + a[0][0];
- int second = e[1] + a[1][0];
- for (int i = 1; i < len; i++) {
- int up = Math.min(first + a[0][i],second + t[1][i-1] + a[0][i]);
- int down = Math.min(second + a[1][i],first + t[0][i-1] + a[1][i]);
- first = up;
- second = down;
- }
- first += x[0];
- second += x[1];
- min = Math.min(first, second);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement