Job 19482

Owner
David Manda
Problem
Keyboard
Contest
MindCoding 2017 Round 3 Take Off Labs (Div. 1)
Source
1.16KB
Result
Wrong answer

Compiler output

prog.cpp: In function 'int main()':
prog.cpp:33:22: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                      ^
prog.cpp:33:28: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                            ^
prog.cpp:33:41: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                                         ^
prog.cpp:33:47: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                                               ^
prog.cpp:33:60: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                                                            ^
prog.cpp:33:68: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                                                                    ^
prog.cpp:33:81: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                                                                                 ^
prog.cpp:33:87: warning: array subscript has type 'char' [-Wchar-subscripts]
         if(abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1])<abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]))
                                                                                       ^
prog.cpp:35:28: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1]);
                            ^
prog.cpp:35:34: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1]);
                                  ^
prog.cpp:35:47: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1]);
                                               ^
prog.cpp:35:53: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]]-X[l1])+abs(Y[S[i]]-Y[l1]);
                                                     ^
prog.cpp:40:28: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]);
                            ^
prog.cpp:40:36: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]);
                                    ^
prog.cpp:40:49: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]);
                                                 ^
prog.cpp:40:55: warning: array subscript has type 'char' [-Wchar-subscripts]
             sol+=abs(X[S[i]] - X[l2])+abs(Y[S[i]]-Y[l2]);
                                                       ^
prog.cpp:13:9: warning: unused variable 'a' [-Wunused-variable]
     int a,b,n;
         ^
prog.cpp:13:11: warning: unused variable 'b' [-Wunused-variable]
     int a,b,n;
           ^

Results

Test numberResultTime
1Ok0.5310s
2Ok0.5229s
3Ok0.5209s
4Wrong answer0.5060s
Questions?

Sponsors Gold