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…
Proud Merchants Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 4219 Accepted Submission(s): 1740 Problem Description Recently, iSea went to an ancient country. For such a long time, it was…
1.hdu 2126 Buy the souvenirs 题意:给出若干个纪念品的价格,求在能购买的纪念品的数目最大的情况下的购买方案. 思路:01背包+记录方案. #include<iostream> #include<cstdio> #include<cstring> using namespace std; ; ; int cnt[maxw]; int dp[maxw]; int p[maxn]; int main() { int t; scanf("%…
Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了.要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的.Speakless没有多少钱,总共只攒了n万美元.他将在m个学校中选择若干的(当然要在他的经济承受范围内).每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这个学校offer的可能性b.不同学校之间是否得到offer不会互相影响.“I NEED A OFFER”,他大叫一声.帮帮这个可怜的人吧,…
///给你n 求他能分解成多少个的不同的k个素数相加之和 ///01背包,素数打表 # include <stdio.h> # include <algorithm> # include <string.h> # include <math.h> # include <iostream> using namespace std; int cot; int used[1500]; int prime[1500]; void sushu()///素数…