- 博客(13)
- 收藏
- 关注
原创 装箱问题及延伸
问题描述有一个箱子容量为v(正整数,o≤v≤20000),同时有n个物品(30),每个物品有一个体积 (o≤正整数≤10000)。要求从 n 个物品中,任取若千个装入箱内。模型1,小于等于V的最大值。方法1设 f [ i ] 为不超过 i 的最大值,就可以看做背包。即费用等于价值。得 f [ j ] = max{ f [ j - a [ i ] ] + a [ i ] }...
2019-06-21 21:19:12 1132
原创 [USACO09OCT]木瓜的丛林Papaya Jungle
题目描述Bessie has wandered off the farm into the adjoining farmer's land. He raises delicious papaya fruit, which is a delicacy for cows. The papaya jungle is partitioned into a grid of squares with R ...
2019-06-14 09:33:12 576
原创 第一次,第二次,成交!
题目描述因为奶牛们的节食运动(奶牛还节食?)给农夫JOHN余下了一大批干草无法处理,所以他准备要开一个拍卖会去出售他的干草。他有N(1<=N<=1000)批干草(每批大约100捆)。他的客户有M个(1<=M<=1000),都是和他相邻的农夫。 第I名农夫会告诉农夫JOHN他会为农夫JOHN的每批干草付P_i的钱(1<=P_i<=1,000,000)。每个农夫...
2019-06-13 21:31:59 782
原创 梦中的统计
题目描述Bessie的大脑反应灵敏,仿佛真实地看到了她数过的一个又一个数。她开始注意每一个数码(0..9):每一个数码在计数的过程中出现过多少次?给出两个整数M 和N (1 ≤M ≤N ≤2,000,000,000 以及N-M ≤500,000),求每一个数码出现了多少次。例如考虑序列129--137: 129, 130, 131, 132, 133, 134, 135, 136, 1...
2019-06-13 20:13:20 897
原创 小明的账单
题目描述小明在一次聚会中,不慎遗失了自己的钱包,在接下来的日子,面对小明的将是一系列的补卡手续和堆积的账单… 在小明的百般恳求下,老板最终同意延缓账单的支付时间。可老板又提出,必须从目前还没有支付的所有账单中选出面额最大和最小的两张,并把他们付清。还没有支付的账单会被保留到下一天。 请你帮他计算出支付的顺序。输入第1行:一个正整数N(N≤15,000),表示小明补办银联卡总共的天数。...
2019-06-13 19:41:05 1632
原创 新开
——文笔渣——欢迎来到绝对不改背景的博客,至少这句话还在的时候2019年6月12日中考结束,又是一个新的开始。重拾信息学,发现啥都不会了。所以决定从新从新开始,记录成长。...
2019-06-13 09:43:48 116
原创 Our Tanya is Crying Out Loud
B. Our Tanya is Crying Out LoudRight now she actually isn't. But she will be, if you don't solve this problem.You are given integersn,k,AandB. There is a numberx, which is initially equal to...
2019-06-13 09:26:59 174
原创 Intercepted Message
http://codeforces.com/problemset/problem/950/BHacker Zhorik wants to decipher two secret messages he intercepted yesterday. Yeah message is a sequence of encrypted blocks, each of them consists of s...
2019-06-13 09:26:07 366
原创 Left-handers, Right-handers and Ambidexters
http://codeforces.com/problemset/problem/950/AYou are at a water bowling training. There arelpeople who play with their left hand,rpeople, who play with their right hand, andaambidexters, wh...
2019-06-13 09:25:49 241
原创 01串 Stringsobits
www.luogu.org/problemnew/show/P2727(说明:题目翻译来自NOCOW。来源落谷P2727-USACO Training Section 3.2)题目背景考虑排好序的N(N<=31)位二进制数。题目描述他们是排列好的,而且包含所有长度为N且这个二进制数中1的位数的个数小于等于L(L<=N)的数。你的任务是输出第i(1<=...
2019-06-13 09:24:21 430
原创 阶乘问题
www.luogu.org/problemnew/show/P1134(说明:来源落谷P1134-USACO Training Section 3.2)题目描述也许你早就知道阶乘的含义,N阶乘是由1到N相乘而产生,如:12! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 = 479,001,60012的阶乘最右...
2018-03-10 08:29:21 569
原创 Points on the line
A. Points on the lineWe've got no test cases. A big olympiad is coming up. But the problemsetters' number one priority should be adding another problem to the round.Thediameterof a multiset of p...
2018-02-26 00:05:16 520
原创 Phone Numbers
C. Phone NumbersAnd where the are the phone numbers?You are given a stringsconsisting of lowercase English letters and an integerk. Find the lexicographically smallest stringtof lengthk, ...
2018-02-25 23:40:59 1154
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人