赵乐ACM

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年7月10日

摘要: 1. 写得最有逻辑的一道题了,10次讲座学的最好的就是DFS和BFS了。2. 直接深搜#include #include #include #include #include #include #include #include #include #include using namespace std; int a, b, sx, sy; char map[25][25]; int num[25][25]; bool flag[25][25]; int dir[8][2] = {{-1, -1}, {0, -1}, {1, -1}, {1, 0}, {1, 1}, {0... 阅读全文
posted @ 2012-07-10 16:25 赵乐ACM 阅读(160) 评论(0) 推荐(0)

摘要: #include #include #include #include #include #include #include //#include #include #include const int INT_MAX = (1 d[i][k] + d[k][j]) d[i][j] = d[i][k] + d[k][j]; } int main() { int n, j, i, a, b, m; while (cin >> n) { if (!n) break; ... 阅读全文
posted @ 2012-07-10 15:27 赵乐ACM 阅读(140) 评论(0) 推荐(0)