Job 19498

Owner
Tudor Costin Razvan
Problem
Keyboard
Contest
MindCoding 2017 Round 3 Take Off Labs (Div. 1)
Source
1.57KB
Result
Accepted

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));
                                      ^

Results

Test numberResultTime
1Ok0.5154s
2Ok0.5300s
3Ok0.5375s
4Ok0.5401s
5Ok0.5437s
6Ok0.5470s
7Ok0.5610s
8Ok0.5480s
9Ok0.5422s
10Ok0.5555s
Questions?

Sponsors Gold