摘要: 佐助被大蛇丸诱骗走了,鸣人在多少时间内能追上他呢? 已知一张地图(以二维矩阵的形式表示)以及佐助和鸣人的位置。地图上的每个位置都可以走到,只不过有些位置上有大蛇丸的手下,需要先打败大蛇丸的手下才能到这些位置。鸣人有一定数量的查克拉,每一个单位的查克拉可以打败一个大蛇丸的手下。假设鸣人可以往上下左右四 阅读全文
posted @ 2017-03-13 22:20 明早六点起 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.Th 阅读全文
posted @ 2017-03-13 08:22 明早六点起 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Problem Description Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at 阅读全文
posted @ 2017-03-08 20:05 明早六点起 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 int main() 5 { 6 int N, M, W, V; 7 int i, j, temp; 8 int *F; 9 scanf("%d %d",&N,&M); 10 F = (int*)calloc(M+1,sizeof(int)); 11 for(i=1;i=W;j--) 15 { 16 temp = F[j... 阅读全文
posted @ 2017-03-02 12:52 明早六点起 阅读(145) 评论(0) 推荐(0) 编辑