problem:
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value (will
always be po...
分类:
系统相关 时间:
2015-05-05 19:42:16
阅读次数:
204
Problem DescriptionAfter inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have ...
分类:
其他好文 时间:
2015-05-02 12:20:50
阅读次数:
90
DescriptionFarmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the sma...
分类:
其他好文 时间:
2015-05-01 16:00:49
阅读次数:
165
点击打开杭电1024
Problem Description
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced wi...
分类:
其他好文 时间:
2015-04-30 12:38:42
阅读次数:
214
To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L ...
分类:
其他好文 时间:
2015-04-29 17:14:16
阅读次数:
131
题目大意:有若干城市,有些城市可以到达并且有花费,初始在城市1,要求旅游k天,并且最终在城市n,求是否能达到,若能求最小花费。
用d[i][j]表示第i天在城市j的最小花费,从d[i-1][u]递推而来,其中u是第i-1天所在的城市。
#include
#include
int a[40][40][100];
int d[1100][30];
int main(void)
{
...
分类:
其他好文 时间:
2015-04-29 00:50:02
阅读次数:
119
基本的两种task调用方式: apply_async()和delay(),前者要把参数放在元组或字典中,后者直接使用参数 快速参考: T.delay(arg, kwarg=value) always a shortcut to .apply_async. T.apply_async((arg, ), {‘kwar...
分类:
其他好文 时间:
2015-04-26 15:21:48
阅读次数:
191
题目描述Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if t...
分类:
系统相关 时间:
2015-04-26 12:26:48
阅读次数:
133
第4种风格的Verilog HDL模型来表示同一个有限状态。在这个模型中,我们分别用沿触发的always语句和电平敏感的always语句把状态机的触发器部分和组合逻辑部分分成两部分来描述。注意:沿触发的always语句中采用并发(非阻塞)赋值的方式;电平敏感的always语句中采用阻塞赋值的方式;例...
分类:
其他好文 时间:
2015-04-24 08:59:41
阅读次数:
177
Breaking Bad (绝命毒师)第三季中大毒枭对老白说的一段话,感触颇深。
B: What does a man do, Walter? A man provides for his family.
W: This cost me my family.
B: When you have children, you always have family.They will alw...
分类:
其他好文 时间:
2015-04-23 23:32:07
阅读次数:
274