1008 Elevator (20)(20 分) The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator…
坑爹题,两种输入输出互相交换,裸bfs #include <stdio.h> #include <string.h> typedef struct { int x; int y; } point; point q[310]; int vis[15][15],mat[15][15]; int dx[4]= {1,0,-1,0}; int dy[4]= {0,1,0,-1}; char ans[5]= {"RTLB"}; int bfs1(int x,int y)…
Problem Description Given a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub-string.…