/*
ID:kevin_s1
PROG:numtri
LANG:C++
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define MAXN 1001
//gobal v...
分类:
其他好文 时间:
2014-06-20 12:02:24
阅读次数:
192
强大的 CD 命令技巧 -rw-------. 1 root root 14808 Mar
13 12:31 .bash_history -rw-r--r--. 1 root root 18 May 20 2009 .bash_logout
-rw-r--r--. 1 root root 176 M...
分类:
系统相关 时间:
2014-06-11 09:51:09
阅读次数:
374
/*
ID:kevin_s1
PROG:sprime
LANG:C++
*/
//N = 1只可能为2,3,5,7,N > 1只可能为1,3,7,9. N = i,到N = i + 1递推如果是素数就扩展,类似于BFS#include
#include
#include
#include
#include
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2014-06-07 11:55:15
阅读次数:
187
How Scala killed the Strategy PatternBy Alvin
Alexander. Last updated: Mar 23, 2014table of contents[hide]The OOP Strategy
PatternTwo immediate though...
分类:
其他好文 时间:
2014-06-06 23:16:45
阅读次数:
480
本题使用动态规划法, 或者记忆法,加上递归法。
不加上递归法,好像很麻烦,因为我们不知道其初始值,只知道其最终值,所以只能往下递推了,这样使用记忆法就比动态规划要方便了。
使用二维表设计其递归记忆表,防止重复计算。还是十分困难的,动态规划法有时候不一定比记忆法要好。
递归记忆法的学名: top-down with memoization; Introduction to Algorithm的Dynamic programming 这章有介绍...
分类:
其他好文 时间:
2014-06-02 23:04:24
阅读次数:
397
Rope Folding [Brian Dean, 2012]时间限制: 1 Sec
内存限制: 128 MB题目描述Farmer John has a long rope of length L (1 =f(i)的最大i值,递归即可。Work
Scheduling [Richard Peng, ....
分类:
其他好文 时间:
2014-06-02 17:40:21
阅读次数:
1039
首先我们来看一个代码:复制代码代码如下: Absolute (layer2) Normal
Text Content (layer3) 这个代码的效果如下:在FF和IE8下都没有任何问题的,但是在IE6和IE7下有人如下两个bug:a,
绝对定义(position:absolute)的相邻元素mar...
分类:
其他好文 时间:
2014-06-02 01:19:44
阅读次数:
291
【问题描述】三个农民每天清晨5点起床,然后去牛棚给3头牛挤奶。第一个农民在300时刻(从5点开始计时,秒为单位)给他的牛挤奶,一直到1000时刻。第二个农民在700时刻开始,在
1200时刻结束。第三个农民在1500时刻开始2100时刻结束。期间最长的至少有一个农民在挤奶的连续时间为900秒(从30...
分类:
其他好文 时间:
2014-05-31 21:03:28
阅读次数:
249
Gold CoinsTime Limit: 1000MSMemory Limit:
30000KTotal Submissions: 20802Accepted: 13018DescriptionThe king pays his loyal
knight in gold coins. On the...
分类:
其他好文 时间:
2014-05-31 21:00:16
阅读次数:
360
【问题描述】一块N x N(1 2 #include 3 #include 4
#include 5 #include 6 #include 7 const int maxn=15; 8 const int INF=0x7fffffff;
9 using namespace...
分类:
其他好文 时间:
2014-05-31 19:38:46
阅读次数:
343