Job 19457

Owner
Cristea Theodor Stefan
Problem
Keyboard
Contest
MindCoding 2017 Round 3 Take Off Labs (Div. 1)
Source
2.01KB
Result
Accepted

Compiler output

prog.cpp: In function 'int main()':
prog.cpp:51:5: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
     gets (str + 1);
     ^
prog.cpp:51:18: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
     gets (str + 1);
                  ^
prog.cpp:74:27: warning: array subscript has type 'char' [-Wchar-subscripts]
                 cdp[str[h]][j] = min (cdp[str[h]][j], dp[i][j] + cost[i][str[h]]);
                           ^
prog.cpp:74:49: warning: array subscript has type 'char' [-Wchar-subscripts]
                 cdp[str[h]][j] = min (cdp[str[h]][j], dp[i][j] + cost[i][str[h]]);
                                                 ^
prog.cpp:74:80: warning: array subscript has type 'char' [-Wchar-subscripts]
                 cdp[str[h]][j] = min (cdp[str[h]][j], dp[i][j] + cost[i][str[h]]);
                                                                                ^
prog.cpp:75:30: warning: array subscript has type 'char' [-Wchar-subscripts]
                 cdp[i][str[h]] = min (cdp[i][str[h]], dp[i][j] + cost[j][str[h]]);
                              ^
prog.cpp:75:52: warning: array subscript has type 'char' [-Wchar-subscripts]
                 cdp[i][str[h]] = min (cdp[i][str[h]], dp[i][j] + cost[j][str[h]]);
                                                    ^
prog.cpp:75:80: warning: array subscript has type 'char' [-Wchar-subscripts]
                 cdp[i][str[h]] = min (cdp[i][str[h]], dp[i][j] + cost[j][str[h]]);
                                                                                ^
prog.cpp:77:46: warning: array subscript has type 'char' [-Wchar-subscripts]
                 mi = min (mi, min (cdp[str[h]][j], cdp[i][str[h]]));
                                              ^
prog.cpp:77:65: warning: array subscript has type 'char' [-Wchar-subscripts]
                 mi = min (mi, min (cdp[str[h]][j], cdp[i][str[h]]));
                                                                 ^
prog.cpp:81:24: warning: 'mi' may be used uninitialized in this function [-Wmaybe-uninitialized]
     printf ("%d\n", mi);
                        ^
/tmp/ccEObYKY.o: In function `main':
prog.cpp:(.text.startup+0x58): warning: the `gets' function is dangerous and should not be used.

Results

Test numberResultTime
1Ok0.2555s
2Ok0.2563s
3Ok0.2591s
4Ok0.2493s
5Ok0.2461s
6Ok0.2527s
7Ok0.2568s
8Ok0.2500s
9Ok0.2620s
10Ok0.2527s
Questions?

Sponsors Gold