Gym 101617J Treasure Map(bfs暴力)】的更多相关文章

http://codeforces.com/gym/101617/attachments 题意:给出一个图,每个顶点代表一个金矿,每个金矿有g和d两个值,g代表金矿初始的金子量,d是该金矿每天的金子量会减少d.顶点与顶点之间存在边,意思是从一个金矿到另一个金矿需要花费的天数.现在有个人一开始在1金矿,问最多能挖到多少金矿,注意,不能在一个金矿连续挖几天. 思路:bfs求解,但是需要剪枝,用二位数组d[v][day]记录第day天时在v金矿所能获得的最大值. #include<iostream>…
A - Treasure Island Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Description standard input/output Announcement   Statements Pirate John Silver has found a map depicting exactly one island in a sea. The…
Treasure Map Time Limit: 2 Seconds      Memory Limit: 32768 KB Your boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, and what make it worse, he has lost some of the pieces. Luck…
Treasure Map Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3209 Appoint description:  System Crawler  (2015-04-09) Description Your boss once had got many copies of a treasure map. Unfortunately…
Description Your boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, and what make it worse, he has lost some of the pieces. Luckily, it is possible to figure out the position of e…
Treasure Map Time Limit: 2 Seconds      Memory Limit: 32768 KB Your boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, and what make it worse, he has lost some of the pieces. Luck…
Description There is a robot, its task is to bury treasures in order on a N × M grids map, and each treasure can be represented by its weight, which is an integer. The robot begins to bury the treasures from the top-left grid. Because it is stupid, i…
题目链接:https://vjudge.net/problem/ZOJ-3209 Treasure Map Time Limit: 2 Seconds      Memory Limit: 32768 KB Your boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, and what make it wo…
题意: 在可以行走的区域内,只能转一次90度的弯,问你最长这条路可以多长. 思路: 我们可以看到 /* 123 8 4 765 */ 转90度的路径会是横竖,也就是1-3-5-7; 还有斜的:2-4-6-8: 我们可以对一个点直接BFS/暴力一下,方向是八个方向,然后计算对应的90度方向上的距离和,开个数组表示某方向上的路径长度,我们可以发现90度方向在数组上的规律,然后再暴力找个最大. 复杂度也不高. 贴一发挫code--. //#include<bits/stdc++.h> #includ…
F. FloodTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/F Description We all know that King Triton doesn't like us and therefore shipwrecks, hurricanes and tsunami do happen. But being bored with the same routine…