C # implementation of th approach
using System ; using System . Collections . Generic ; class GFG { readonly static int N = 100 ; readonly static int INT_MIN = int . MinValue ; static int [ , ] dp = new int [ N , 3 ] ; static int [ , ] v = new int [ N , 3 ] ;