Java Program to Paint N boxes using M colors such that K boxes have color different from color of box on its left
class GFG { static int M = 1001 ; static int MOD = 998244353 ; static int [ ] [ ] dp = new int [ M ] [ M ] ;