The Problem. 求解8数码问题。用最少的移动次数能使8数码还原. Best-first search.使用A*算法来解决,我们定义一个Seach Node,它是当前搜索局面的一种状态,记录了从初始到达当前状态的移动次数和上一个状态。初始化时候,当前状态移动次数为0,上一个状态为null,将...
分类:
其他好文 时间:
2014-07-16 21:29:13
阅读次数:
187
DescriptionA data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers...
分类:
其他好文 时间:
2014-07-16 21:27:30
阅读次数:
198
这道题当时拿着一看,想都没想就上了前缀和,但看了数据范围,还是必挂的节奏。其实,应对每个前缀和取模,再桶排序一次。还有 有负数#include #include #include #include #include using namespace std;const int maxn = 50000...
分类:
其他好文 时间:
2014-07-16 20:52:38
阅读次数:
149
转自:http://www.ruanyifeng.com/blog/2008/07/best_webpage_width_and_realization.html1.设计网页的时候,确定宽度是一件很苦恼的事。 以minifun.cn为例,根据Google Analytics的统计,半年多以来,访问者...
分类:
Web程序 时间:
2014-07-16 20:43:57
阅读次数:
195
7月10日sequence|sequence.in|sequence.out题目描述:给定一个整数K和长为N的数列{Ai},求有多少个子串(不含空串)的和为K的倍数。(在这里子串表示{A[i]..A[j]},i#include#include#define PROC "sequence"using ...
分类:
其他好文 时间:
2014-07-16 20:26:34
阅读次数:
111
英文原文:The Best Font for Programming: M+ 程序员的最佳等宽字体是 M+。 一个偶然机会遇到了这个字体,在命运多舛的kod编辑器体验了。这个字体非比寻常,我坚持这个选择已有三年多时间了。 // 编注:kod 一个面向在 OS X 平台开发的编辑器。 我看过很...
分类:
其他好文 时间:
2014-07-13 12:16:02
阅读次数:
282
考试的时候想了好久都没想出正解 >_ 2 #include 3 #include 4 using namespace std; 5 #define N 500500 6 typedef long long LL; 7 8 int n,k; 9 int num[N];10 int sum[N];...
分类:
其他好文 时间:
2014-07-13 08:20:23
阅读次数:
207
在Linux下执行svn add *时出现如下错误:svn: Valid UTF-8 data(hex: 4b)followed by invalid UTF-8 sequence(hex: fc 63 68 65)出现这个错误是因为svn库里有文件的名字不是utf-8编码的,这种情况对于中文来说很...
分类:
系统相关 时间:
2014-07-13 08:03:13
阅读次数:
324
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on...
分类:
其他好文 时间:
2014-07-12 16:31:50
阅读次数:
192
Choose the best routeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6501Accepted Submission(s): 2...
分类:
其他好文 时间:
2014-07-12 15:01:18
阅读次数:
156