- 博客(5)
- 收藏
- 关注
原创 Fence Repair 合并贪心
Fence RepairFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length...
2018-04-24 23:59:00 131
原创 Crossing River
Crossing RiverA group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order to row the b...
2018-04-24 23:36:18 207
原创 dp升级 power oj 2784 上决╇ф人员分配问题
2784: 上决╇ф人员分配问题 Time Limit: 1000 MS Memory Limit: 65536 KB Description 上决╇ф招募了2×n2×n个ACMer,准备奇袭Ceph老巢。这2×n2×n个人的编号分别为1−2n1−2n,第ii和人的战斗力为aiai。现在上决╇ф要把这些ACMer分为两组,每组nn个人,并且要使这两组人的战斗力的和的差值最小。上决╇...
2018-04-16 23:06:48 386
原创 区间dp石子归并问题
石子归并 现在有n堆石子,第i堆有ai个石子。现在要把这些石子合并成一堆,每次只能合并相邻两个,每次合并的代价是两堆石子的总石子数。求合并所有石子的最小代价。 Input 第一行包含一个整数T(T<=50),表示数据组数。 每组数据第一行包含一个整数n(2<=n<=100),表示石子的堆数。 第二行包含n个正整数ai(ai<=100),表示每堆石子的石子数。 Output ...
2018-04-12 17:09:20 331
原创 Mahmoud and Ehab and the message(需要用到map,避免超时)
Mahmoud wants to send a message to his friend Ehab. Their language consists of n words numbered from 1 to n. Some words have the same meaning so there are k groups of words such that all the words in ...
2018-04-05 21:29:20 244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人