题目大意:有两匹马,马可以走"日",也可以像象走"田",求它走到(1,1)的步数. 题解:bfs 卡点:边界判断成了可以走到(0,y)或(x,0) C++ Code: #include<cstdio> #include<cstring> using namespace std; const int maxn=51; int dx[12]={2,-2,2,-2,1,1,-1,-1,2,2,-2,-2}; int dy[12]={2,2,-2,-…
题目描述 Farmer John's cows like to play coin games so FJ has invented with a new two-player coin game called Xoinc for them. Initially a stack of N (5 <= N <= 2,000) coins sits on the ground; coin i from the top has integer value C_i (1 <= C_i <=…