Compiler output
prog.cpp: In function 'int main()':
prog.cpp:44:15: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][s[i]][k]=min(dp[i][s[i]][k],dp[i-1][j][k]+dist((int)s[i],j));
^
prog.cpp:44:34: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][s[i]][k]=min(dp[i][s[i]][k],dp[i-1][j][k]+dist((int)s[i],j));
^
prog.cpp:45:18: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][j][s[i]]=min(dp[i][j][s[i]],dp[i-1][j][k]+dist((int)s[i],k));
^
prog.cpp:45:37: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][j][s[i]]=min(dp[i][j][s[i]],dp[i-1][j][k]+dist((int)s[i],k));
^
prog.cpp:47:40: warning: array subscript has type 'char' [-Wchar-subscripts]
if(i==n) ans=min(ans,min(dp[i][s[i]][k],dp[i][j][s[i]]));
^
prog.cpp:47:58: warning: array subscript has type 'char' [-Wchar-subscripts]
if(i==n) ans=min(ans,min(dp[i][s[i]][k],dp[i][j][s[i]]));
^