openjudge ROADS】的更多相关文章

726:ROADS 总时间限制: 1000ms 内存限制: 65536kB 描述 N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (expressed in the number…
OpenJudge 726:ROADS 总时间限制: 1000ms内存限制: 65536kB 描述 N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (expressed in th…
1.链接地址: http://bailian.openjudge.cn/practice/1251/ http://poj.org/problem?id=1251 2.题目: 总时间限制: 1000ms 内存限制: 65536kB 描述 热 带岛屿Lagrishan的首领现在面临一个问题:几年前,一批外援资金被用于维护村落之间的道路,但日益繁茂的丛林无情的侵蚀着村民的道路,导致道路维 修开销巨大,长老会不得不放弃部分道路的维护.上图左侧图显示的是正在使用道路的简图以及每条路每个月的维修费用(单位…
poj   1251  Jungle Roads  (最小生成树) Link: http://poj.org/problem?id=1251 Jungle Roads Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23507   Accepted: 11012 Description The Head Elder of the tropical island of Lagrishan has a problem. A b…
Jungle Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7096    Accepted Submission(s): 5185 Problem Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of…
Rebuilding Roads Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 11495   Accepted: 5276 Description The cows have reconstructed Farmer John's farm, with its N barns (1 <= N <= 150, number 1..N) after the terrible earthquake last May. Th…
http://noi.openjudge.cn/ch0204/8463/ 挺恶心的一道简单分治. 一开始准备非递归. 大if判断,后来发现代码量过长,决定大打表判断后继情况,后来发现序号不对称. 最后发现非递归分治非常不可做. 采用递归和坐标变换,降低了编程复杂度和思维复杂度. 坐标变换的思想十分的清晰啊!它是个好东西啊,以后要善用. #include<cmath> #include<cstdio> #include<cstring> #include<algor…
http://noi.openjudge.cn/ch0405/191/ http://poj.org/problem?id=1189 一开始忘了\(2^{50}\)没超long long差点写高精度QvQ 很基础的dp,我先假设有\(2^n\)个球,分开时就分一半,这样每次都能除开. #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long…
http://noi.openjudge.cn/ch0405/1665/?lang=zh_CN 状压水题,手动转移 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int in() { int k = 0, fh = 1; char c = getchar(); for(; c < '0' || c > '9'; c = getchar()) if (c…
http://noi.openjudge.cn/ch0405/1793/ 好虐的一道题啊. 看数据范围,一眼状压,然后调了好长时间QwQ 很容易想到覆盖的点数作为状态,我用状态i表示至少覆盖状态i表示的点的最小矩形覆盖面积. 又因为矩形一定在两个给出的点上,转移时枚举两个点,用去掉这两个点的状态来更新? 这是错误的做法,反例:4 (0,0) (0,1) (1,0) (1,1) 所以我们需要去掉这两个点的同时,去掉这两个点构成的矩形包含的所有在状态中的点. 但这样还是会WA,因为还需要初始化至少包…