Given three arrays a,b,c all of same length N. You want to minimize the value of :↵
↵
max( (a(i)+t)%k + (b(i)+t)%k + (c(i)+t)%k ) , for all 1<=i<=n .↵
↵
↵
↵
where 't' can be any non-negative integer.↵
↵
Input : Three arrays of size 'N' and an integer 'k'. How to find a 't' which can minimize this value ? ↵
↵
↵
max( (a(i)+t)%k + (b(i)+t)%k + (c(i)+t)%k ) , for all 1<=i<=n .↵
↵
↵
↵
where 't' can be any non-negative integer.↵
↵
Input : Three arrays of size 'N' and an integer 'k'. How to find a 't' which can minimize this value ? ↵
↵