题意:有n个城市并排着,每个城市有些珠宝,有两个人站在第s个城市准备收集珠宝,两人可以各自行动,但两人之间的距离不能超过dis,而且每经过一个城市就需要消耗1天,他们仅有t天时间收集珠宝,问最多能收集多少珠宝?思路: 其实就是类似一个滑动窗口在收集一个序列上的权值。首先两个人可以同时往两边散开,直....
分类:
其他好文 时间:
2015-09-24 00:37:25
阅读次数:
216
时限:2000MS内存:65536KB64位IO格式:%I64d & %I64u提交状态练习指定题目版本:问题描述Acm, a treasure-explorer, is exploring again. This time he is in a special maze, in which the...
分类:
其他好文 时间:
2015-09-23 17:01:44
阅读次数:
200
Life is hard, always so.If there's anything to give you a hard life with sunshine and warmth, please treasure, it will be a lifetime of memories.生活很难,...
分类:
其他好文 时间:
2015-09-22 10:02:50
阅读次数:
145
Treasure Hunt大意:在一个矩形区域内。有n条线段,线段的端点是在矩形边上的,有一个特殊点,问从这个点到矩形边的最少经过的线段条数最少的书目,穿越仅仅能在中点穿越。思路:须要巧妙的转换一下这个问题,由于从一个点到终点不可能“绕过”围墙。仅仅能穿过去,所以门是否开在中点是无所谓的,仅仅要求四...
分类:
其他好文 时间:
2015-09-21 13:57:00
阅读次数:
125
前几天长春网络赛一道lucas + CRT 模板题,当时没做出来。 地址:http://acm.hdu.edu.cn/showproblem.php?pid=5446 中国剩余定理 在《孙子算经》中有这样一个问题:“今有物不知其数,三三数之剩二(除以3余2),五五数之剩三(除以5余3)...
分类:
其他好文 时间:
2015-09-18 13:46:18
阅读次数:
463
HDU 6446 Unknown Treasure题意:求C(n, m) %(p[1] * p[2] ··· p[k]) 0 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #inc...
分类:
其他好文 时间:
2015-09-16 21:47:52
阅读次数:
247
题目传送门题意:很裸,就是求C (n, m) % (p1 * p2 * p3 * .... * pk)分析:首先n,m#include #include #include #include #include #include #include #include #include #include #...
分类:
其他好文 时间:
2015-09-15 16:30:36
阅读次数:
210
Problem DescriptionOn the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician ente...
分类:
其他好文 时间:
2015-09-14 22:20:00
阅读次数:
222
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5446题目大意:求C(n, m) % M, 其中M为不同素数的乘积,即M=p1*p2*...*pk, 1≤k≤10。1≤m≤n≤10^18。分析:如果M是素数,则可以直接用lucas定理来做,但是M不是...
分类:
其他好文 时间:
2015-09-13 22:52:57
阅读次数:
279
Unknown TreasureTime Limit: 1 Sec Memory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5446DescriptionOn the way to the next secret treas...
分类:
其他好文 时间:
2015-09-13 19:48:56
阅读次数:
365