InternshipTime Limit: 5000msMemory Limit: 32768KBThis problem will be judged on ZJU. Original ID: 2532 64-bit integer IO format: %lld Ja...
分类:
其他好文 时间:
2015-03-14 19:50:28
阅读次数:
153
Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power ...
分类:
其他好文 时间:
2015-03-14 11:04:05
阅读次数:
122
1 #include 2 #include 3 #include 4 #include 5 #include 6 #define sc(x) scanf("%d",&x) 7 #define pf(x) printf("%d\n",x) 8 #define P printf("\n") ...
分类:
其他好文 时间:
2015-03-13 22:04:06
阅读次数:
131
Optiver sponsored problem.
After years of hard work Optiver has developed a mathematical model that allows them to predict wether or not a company will be succesful. This obviously gives them a grea...
分类:
其他好文 时间:
2015-03-13 12:44:34
阅读次数:
205
题意:
找一个小于N的最大的且符合题意的数。
题意的数为,通过缩减后是回文的数,所谓的缩减就是相同连续的数看做一个数,如“155451111”其实就是“15451”是符合题意的数。
思路:
通过数位dp,然后二分求解。
dp[i][j][k]代表第i位,已经放了j个数,最后长度是k的缩减回文数有几个。
然后需要一个ok[]数组代表放的数是什么,如果连续放相同的数就等于没放数。
遍历所...
分类:
其他好文 时间:
2015-03-11 19:45:12
阅读次数:
140
Few weeks ago, a famous software company has upgraded its instant messaging software. A ranking system was released for user groups. Each member of a group has a level placed near his nickname. The le...
分类:
其他好文 时间:
2015-03-11 17:14:04
阅读次数:
196
题意:有n张股票,给出每天股票的买进数量,当天的股票价格和当天最大抛出量,第i天得到的股票当天可以不抛,可以留到以后抛。问这n天最多能卖多少钱?
思路:贪心,从后往前贪心,最后一天的股票当然只能在最后一天卖出,第i天的可以在第i天及以后卖出,那么就可以维护一个优先队列来存放第i天及以后的天数中抛出量不为零的日期(价格高的优先),那抛出第i天时先从优先队列中取出价格最高的。...
分类:
其他好文 时间:
2015-03-10 12:18:11
阅读次数:
128
Alice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than
k friends in common, they will become friends in several days. Cu...
分类:
其他好文 时间:
2015-03-09 09:24:37
阅读次数:
199
给你n个杯子,每次有特定的到水规则,倒m次请问最后每个被子里还有多少水我们很容易发现每次变化的规则相同,那么可以set 一个矩阵存放然后多次倒水就相当于矩阵相乘,在m 范围达到(1#include #include #include #include #include #include #inclu...
分类:
其他好文 时间:
2015-03-08 21:30:13
阅读次数:
148
H - Treasure Hunt IV Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluDescription Alice is exploring the wonderland, suddenly she f.....
分类:
其他好文 时间:
2015-03-07 15:22:29
阅读次数:
125