摘要:
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=4255题目的数据是10000以内的,但是要建400*400的矩阵用一次bfs就可以完成 1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 int ma[410][410]={0},vis[410][410],dist[410][410],mb[410][410];//mb储存数字,ma储存素数 5 int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1}; 6 int q[4 阅读全文
posted @ 2013-02-10 18:40
再见~雨泉
阅读(226)
评论(0)
推荐(0)
摘要:
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1312 1 #include 2 #include 3 #define mem(a) memset(a,0,sizeof(a)); 4 using namespace std; 5 const int MA... 阅读全文
posted @ 2013-02-10 17:19
再见~雨泉
阅读(207)
评论(0)
推荐(0)
摘要:
题目链接http://codeforces.com/problemset/problem/6/CAlice and Bob like games. And now they are ready to start a new game. They have placed n chocolate bars in a line. Alice starts to eat chocolate bars one by one from left to right, and Bob — from right to left. For each chocololate bar the time, needed 阅读全文
posted @ 2013-02-10 16:06
再见~雨泉
阅读(326)
评论(0)
推荐(0)

浙公网安备 33010602011771号