ZOJ 3623 Battle Ships 简单DP】的更多相关文章

链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3623 题意:给出N种可以建造的船和对方的塔生命值L,每种船给出建造时间t[i]和每秒输出dps[i],船坞在同一时间仅仅能建造一支船(类似红警),问多少时间以后可以灭掉塔. 思路:dp[i]代表的是在前i秒内能造成的伤害量,把时间反过来考虑,对于每支船的建造,在前i秒内所占用的建造时间是第i-t[i]+1~i秒,状态转移方程是dp[i+t[j]]=max(dp[i+…
B - Battle Ships Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3623 Appoint description:   Description Battle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a…
Battle Ships Time Limit: 2 Seconds      Memory Limit: 65536 KB Battle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can produce N ki…
同 HDU 2836 只不过改成了求最长子串. DP+线段树单点修改+区间查最值. #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #define lson l, m, rt << 1 #define rson m + 1, r, rt << 1 | 1 using namespace std; ; int n, d; int v…
传送门 D. One-Dimensional Battle Ships time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alice and Bob love playing one-dimensional battle ships. They play on the field in the form of a line con…
Battle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can produce N kinds of battle ships. The factory takes tiseconds to produce the…
传送门Battle Ships Time Limit: 2 Seconds      Memory Limit: 65536 KB Battle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can produce N…
Battle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can produce N kinds of battle ships. The factory takes ti seconds to produce th…
Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33384    Accepted Submission(s): 15093 Problem Description Nowadays, a kind of chess game called “Super Jumping!…
D. One-Dimensional Battle ShipsTime Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/567/problem/D Description Alice and Bob love playing one-dimensional battle ships. They play on the field in the form of a line consisting of n s…