Job 19451

Owner
Posdarascu Eugenie Daniel
Problem
Keyboard
Contest
MindCoding 2017 Round 3 Take Off Labs (Div. 1)
Source
2.09KB
Result
Accepted

Compiler output

prog.cpp: In function 'int dist(char, char)':
prog.cpp:21:23: warning: array subscript has type 'char' [-Wchar-subscripts]
     return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
                       ^
prog.cpp:21:36: warning: array subscript has type 'char' [-Wchar-subscripts]
     return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
                                    ^
prog.cpp:21:54: warning: array subscript has type 'char' [-Wchar-subscripts]
     return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
                                                      ^
prog.cpp:21:67: warning: array subscript has type 'char' [-Wchar-subscripts]
     return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
                                                                   ^
prog.cpp: In function 'int main()':
prog.cpp:65:34: warning: array subscript has type 'char' [-Wchar-subscripts]
                 d[i + 1][s[i + 1]][c2] = min(d[i + 1][s[i + 1]][c2], d[i][c1][c2] + dist(c1, s[i + 1]));
                                  ^
prog.cpp:65:63: warning: array subscript has type 'char' [-Wchar-subscripts]
                 d[i + 1][s[i + 1]][c2] = min(d[i + 1][s[i + 1]][c2], d[i][c1][c2] + dist(c1, s[i + 1]));
                                                               ^
prog.cpp:66:38: warning: array subscript has type 'char' [-Wchar-subscripts]
                 d[i + 1][c1][s[i + 1]] = min(d[i + 1][c1][s[i + 1]], d[i][c1][c2] + dist(c2, s[i + 1]));
                                      ^
prog.cpp:66:67: warning: array subscript has type 'char' [-Wchar-subscripts]
                 d[i + 1][c1][s[i + 1]] = min(d[i + 1][c1][s[i + 1]], d[i][c1][c2] + dist(c2, s[i + 1]));
                                                                   ^

Results

Test numberResultTime
1Ok0.5149s
2Ok0.5182s
3Ok0.5382s
4Ok0.5290s
5Ok0.5300s
6Ok0.5302s
7Ok0.5363s
8Ok0.5116s
9Ok0.5227s
10Ok0.5366s
Questions?

Sponsors Gold