yellow green blue gold red
分类:
其他好文 时间:
2015-07-01 23:24:52
阅读次数:
1709
题意:
给出一个n个结点m条边有向图,可能有负权边;
但是存在负权边a->b则不会有某个路径可以从b到a;
求一个源点s到所有点的最短路(无解输出"NO PATH");
n
题解:
高高兴兴的写了一发spfa,O(km)嘛;
然后就TLE了,这题丧心病狂的把spfa卡掉了;
这时候理所当然的想到了dij+heap,写到一半想起来不支持负权边;
所以这个不是一个简单的单源最...
分类:
其他好文 时间:
2015-06-15 09:26:24
阅读次数:
132
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1030
题意:基础概率题。
代码:#include
#include
#include
#include
#include
#include ...
分类:
其他好文 时间:
2015-06-08 23:29:29
阅读次数:
348
Description
FJ is about to take his N (1 ≤ N ≤ 30,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.
...
分类:
编程语言 时间:
2015-06-08 23:25:46
阅读次数:
195
Dinner时间限制:100ms | 内存限制:65535KB难度:1描述Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite a...
分类:
其他好文 时间:
2015-06-06 06:45:23
阅读次数:
162
题目大意:在一个1*N的格子里,每个格子都有相应的金币数,走到相应格子的话,就会得到该格子的金币。
现在有一个人在1这个位置,手里有一颗色子,色子摇到几,他就前进几步,但有一种情况例外,如果当前位置+色子数 > N,那么他就会重新摇色子。
走到N这个位置的话,意味着游戏结束了。
问游戏结束时,这个人得到金币的期望。解题思路:这题要倒着推,由N推向1
设dp[k]为到达k这个位置时得到金币的期...
分类:
其他好文 时间:
2015-06-04 15:46:15
阅读次数:
98
游戏快正式上线了,今天发现一个bug,让人哭笑不得。数据计算溢出了;玩家充值的元宝变为了0;这个可是一件大事,毕竟谁都担不起这个责任啊;来说说原因吧。开发语言是 java 工具是 netbeans ide 8.0.2玩家对象有一个属性是 gold 是int类型的;玩家充值的时候计算方式如下. ...
分类:
其他好文 时间:
2015-05-29 13:37:41
阅读次数:
126
Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 21730Accepted: 13614DescriptionThe king pays his loyal knight in gold coins. On the first day...
分类:
其他好文 时间:
2015-05-22 13:00:27
阅读次数:
102
Time Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluDescriptionYou are in a cave, a long cave! The cave can be represented by a1 x Ngrid. ...
分类:
其他好文 时间:
2015-05-22 00:30:06
阅读次数:
196
全球黄金需求在第一季度下降1%,受到中国投资者蜂拥投入牛市炒股所导致的珠宝购买大幅减少的打击。世界黄金协会(World Gold Council)昨日在一份报告中表示,在中国股市上涨的同时,该全球最大黄金消费国的珠宝需求下降10%。http://www.ximalaya.com/zhubo/27479671/
http://www.ximalaya.com/zhubo/27479672/
ht...
分类:
其他好文 时间:
2015-05-18 06:37:06
阅读次数:
154