Zhuge Liang's Stone Sentinel MazeTime Limit: 10000/4000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 385Accepted Subm...
分类:
其他好文 时间:
2014-10-31 15:05:48
阅读次数:
210
Frogger
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 26435
Accepted: 8603
Description
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly ...
分类:
其他好文 时间:
2014-10-22 18:21:00
阅读次数:
306
这道题是NOIP第一道DP优化题,看似容易,实际上想要满分也颇有难度。
传送门:1002 过河
算法
此题显然要用到DP,DP方程也显而易见:
if (stone[i]) f[i]=min{f[i-j]}+1; (S
else f[i]=min{f[i-j]};
这样的时间复杂度为 O(LT) ,空间复杂度为 O(L) 。
而此题的L高达 10亿 ,所以这种朴素的方法只能得 30...
分类:
编程语言 时间:
2014-10-22 14:44:16
阅读次数:
309
奇偶排序:
第一轮扫描选择所有的奇数据项对,与相邻偶数比较,a[j]和a[j+1],j是奇数(j=1,3,5...), j
第二轮扫描选择所有的偶数据项对,与相邻奇数比较,a[j]和a[j+1],j是偶数(j=0,2,4...), j
奇偶排序的时间复杂度为O(N^2)
/**
* 奇偶排序
* @author stone
*
*/
public class OddEvenSor...
分类:
编程语言 时间:
2014-10-20 17:23:31
阅读次数:
244
DP: dp[i][j]前i堆排出j长度的序列有多少种排法,
dp[i][j]=dp[i-1][j] (不用第i堆),
dp[i][j]+=dp[i-1][j-k]*C[j][k] (用第i堆的k个石头)
A Famous Stone Collector
Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 3...
分类:
其他好文 时间:
2014-10-18 12:40:59
阅读次数:
299
Frogger
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 26417
Accepted: 8592
Description
Freddy Frog is sitting on a stone in the middle of a lake. Sudde...
分类:
其他好文 时间:
2014-10-16 23:46:53
阅读次数:
239
题目链接:
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=242&page=show_problem&problem=1669
Root :: Regionals
2006 :: Asia - Beijing
R...
分类:
其他好文 时间:
2014-10-16 14:52:12
阅读次数:
669
Wang Xifeng's Little Plot
Problem Description
《Dream of the Red Chamber》(also 《The Story of the Stone》) is one of the Four Great Classical Novels of Chinese literature, and it is commonly ...
分类:
其他好文 时间:
2014-10-14 21:15:09
阅读次数:
231
/**
* 声明一个抽象的解释操作
* @author stone
*
*/
public interface Interpreter {
public void interpret(Context context); //实际中,可以有个返回的类型,定义解释出的数据对象
}
public class XmlSaxInterpreter implements Interpreter...
分类:
编程语言 时间:
2014-10-14 19:23:49
阅读次数:
167
类图
public interface IMediator {
public void createMediator();
public void work();
}
/**
* 中介、调节实际上需要交互的两个元素,让其松耦合
* @author stone
*
*/
public class Mediator implements IMediator {
pr...
分类:
编程语言 时间:
2014-10-14 18:44:59
阅读次数:
192