2set的tarjan写法.....
Party
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3841 Accepted Submission(s): 1244
Problem Description...
分类:
其他好文 时间:
2014-07-22 23:03:55
阅读次数:
304
hdu 1250 Hat's Fibonacci 高精度数,类似万进制...
分类:
其他好文 时间:
2014-05-01 18:26:27
阅读次数:
351
按照之前转载的文章,自己先实现了下,表示还是很多坑:
#include "stdio.h"
#include
#include
#include
#include
using namespace std;
int neigor[][2] ={
{-1, -1}, {0, -1}, {1, -1}, {1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}
}...
分类:
其他好文 时间:
2014-05-01 18:03:27
阅读次数:
320
一、Apriori 算法概述
Apriori 算法是一种最有影响力的挖掘布尔关联规则的频繁项集的 算法,它是由Rakesh Agrawal 和RamakrishnanSkrikant 提出的。它使用一种称作逐层搜索的迭代方法,k- 项集用于探索(k+1)- 项集。首先,找出频繁 1- 项集的集合。该集合记作L1。L1 用于找频繁2- 项集的集合 L2,而L2 用于找L2,如此下去,直到不能找到 ...
分类:
其他好文 时间:
2014-05-01 17:50:47
阅读次数:
280
题目:寻找最长上升自序列。
代码:
#include
#include
#include
#include
using namespace std;
struct node
{
int w,s; //重量,速度
int num; //编号
int t; //用来记录当前编号...
分类:
其他好文 时间:
2014-05-01 17:17:32
阅读次数:
285
最近正在开发一个基于指纹的音乐检索应用,算法部分已经完成,所以尝试做一个Android App。Android与服务器通信通常采用HTTP通信方式和Socket通信方式。由于对web服务器编程了解较少,而且后台服务器已经采用原始socket实现与c客户端通信,这就要求Android客户端也采用socket实现。所以在开发Android app时采用了原始socket进行编程。
由于算法是用C语言...
分类:
编程语言 时间:
2014-04-30 22:31:38
阅读次数:
408
冒泡排序
思路:就是每次将最大或最小的元素放到数组的最后,so easy!时间复杂度为(O(n^2))
public class BubbleSort {
public static void bubbleSort(int[] a) {
for (int j = 1; j < a.length; j++) {
for (int i = 0; i < a.length - j; i+...
分类:
编程语言 时间:
2014-04-30 22:12:40
阅读次数:
309
OJ题目 : click here ~~
题目分析:G种颜色的宝石(Gems),放在B个包里,每个包里同种宝石的个数不定哦。A,B轮流取一个包,宝石放在cooker上,同种颜色的宝石达到S个时,就可以融合成一个魔法石,如果2*S个当然就可以融合成两个魔法石啦。某人在某轮获得了魔法石,可以接着再玩一轮,直到没有获得魔法石。A先开始。问A比B 最多能多多少个魔法石。A,B都采用最优策略。
B的值最...
分类:
其他好文 时间:
2014-04-29 13:46:21
阅读次数:
278
多项式的加减乘除可以利用多项式的加减乘除进行运算,所以以下程序采用了多项式的加减乘除。多项式运算已经在《算法导论》第30章有简要的介绍,具体的请参考数学书。
大整数加法:(利用书上公式轻松得出)
//多项式加法-大数加法
#include
#include
using namespace std;
#define m1 4
#define m2 5
//a[0]=x^0 a[1]=x^1....
分类:
其他好文 时间:
2014-04-29 13:46:21
阅读次数:
326
1、
??
Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
250