POj 2159 Dividing】的更多相关文章

Dividing Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 71453   Accepted: 18631 Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbl…
POJ 2373 Dividing the Path 描述 农夫约翰的牛发现,在他的田里沿着山脊生长的三叶草是特别好的.为了给三叶草浇水,农夫约翰在山脊上安装了喷水器. 为了使安装更容易,每个喷头必须安装在山脊上(我们可以认为这是一条长度为L(1<=L<=1,000,000)的一维数列:L是偶数). 每个洒水器沿山脊向两个方向地面排水一段距离.每个喷雾半径是A.B范围内的整数(1<=A<=B<=1000).农夫约翰需要给整个山脊浇水,用一个喷头覆盖整个山脊上的每一个位置.此外…
题目链接:http://poj.org/problem?id=2159 #include <cstring> #include <cstdio> #include <cctype> char ch1[102]; char ch2[102]; int n1[102]; int n2[102]; int ch1n[26]; int ch2n[26]; int main(){ scanf("%s %s",ch2,ch1); int len=strlen(c…
1.链接地址: http://poj.org/problem?id=2159 http://bailian.openjudge.cn/practice/2159 2.题目: Ancient Cipher Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 28064   Accepted: 9195 Description Ancient Roman empire had a strong government system…
Dividing Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 66032 Accepted: 17182 Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles.…
Dividing   Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles had the same value, because then they cou…
Dividing the Path Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2858   Accepted: 1064 Description Farmer John's cows have discovered that the clover growing along the ridge of the hill in his field is particularly good. To keep the clo…
Dividing Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 63980   Accepted: 16591 Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbl…
http://poj.org/problem?id=1014 题意:6个物品,每个物品都有其价值和数量,判断是否能价值平分. 思路: 多重背包.利用二进制来转化成0-1背包求解. #include<iostream> #include<string> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; ; int sum; ]; int d[max…
原题目:http://poj.org/problem?id=1014 题目大意: 有分别价值为1,2,3,4,5,6的6种物品,输入6个数字,表示相应价值的物品的数量,问一下能不能将物品分成两份,是两份的总价值相等,其中一个物品不能切开,只能分给其中的某一方,当输入六个0是(即没有物品了),这程序结束,总物品的总个数不超过20000 输出:每个测试用例占三行: 第一行: Collection #k: k为第几组测试用例 第二行:是否能分(具体形式见用例) 第三行:空白(必须注意,否则PE) 一:…