Compiler output
prog.cpp: In function 'int cost(char, char)':
prog.cpp:13:17: warning: array subscript has type 'char' [-Wchar-subscripts]
int dx = w[A].first - w[B].first;
^
prog.cpp:13:30: warning: array subscript has type 'char' [-Wchar-subscripts]
int dx = w[A].first - w[B].first;
^
prog.cpp:14:17: warning: array subscript has type 'char' [-Wchar-subscripts]
int dy = w[A].second - w[B].second;
^
prog.cpp:14:31: warning: array subscript has type 'char' [-Wchar-subscripts]
int dy = w[A].second - w[B].second;
^
prog.cpp: In function 'int main()':
prog.cpp:66:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 1 ; i <= arr.size() ; ++i)
^
prog.cpp:72:21: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][j][let] = min(dp[i][j][let] , dp[i - 1][j][k] + cost(let , k));
^
prog.cpp:72:41: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][j][let] = min(dp[i][j][let] , dp[i - 1][j][k] + cost(let , k));
^
prog.cpp:73:18: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][let][k] = min(dp[i][let][k] , dp[i - 1][j][k] + cost(let , j));
^
prog.cpp:73:38: warning: array subscript has type 'char' [-Wchar-subscripts]
dp[i][let][k] = min(dp[i][let][k] , dp[i - 1][j][k] + cost(let , j));
^