摘要:
1.思路果然清晰了,十分钟搞定#include #include #include #include using namespace std; int n, k;
queue q;
int step[100010]; int bfs(int a)
{ if(a == k) return step[k]; else { if(a - 1 >= 0 && step[a - 1] == 0) { step[a - 1] = step[a] + 1; q.push(a... 阅读全文
posted @ 2012-03-12 20:22
赵乐ACM
阅读(205)
评论(0)
推荐(0)