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.
How to solve this modulo related problem ?
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.
| Rev. | Lang. | By | When | Δ | Comment | |
|---|---|---|---|---|---|---|
| en2 |
|
LovesProgramming | 2020-03-27 01:17:20 | 108 | ||
| en1 |
|
LovesProgramming | 2020-03-27 01:15:22 | 246 | Initial revision (published) |