1 /* 2 字符串编辑问题,给定一个源字符串和目的字符串,源字符串可以insert,delete,replace,求最少操作使其变成目标字符串,有两种方法,方法一采用 3 动态规划方法,f[i][j]=min{f[i-1][j]+1,f[i+1][j]+1,f[i-1][j-1]+(s[i...
分类:
其他好文 时间:
2014-07-25 02:22:44
阅读次数:
262
(1)开关结点初始化 ??? 这时选择的节点类型是终端节点,所以使用f8wEndev.cfg文件,所以在Zglobals.h文件中,我们可以得到下面的定义 #define ZG_DEVICETYPE_ENDDEVICE ?????? 0x02 #define DEVICE_LO...
分类:
移动开发 时间:
2014-07-25 00:05:34
阅读次数:
360
The Unique MST
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 19941
Accepted: 6999
Description
Given a connected undirected graph, tell if its min...
分类:
其他好文 时间:
2014-07-24 23:36:24
阅读次数:
403
最长上升子序列+最长递减子序列-重复的方法不严谨,貌似有人已经找到反例了,至于为什么那种方法能ac应该是测试数据弱吧
以下才是最标准的做法
//#pragma comment(linker, "/STACK:102400000,102400000")
#include
#include
#include
#include
#include
#include
#include
#include
...
分类:
其他好文 时间:
2014-07-24 23:11:53
阅读次数:
262
#include#include#define Max 10000000int map[110][110],cost[110],vit[110],m,n;void prim(int x){ int i,j,min,k,sum=0; memset(vit,0,sizeof(vit)); for(i=1...
分类:
其他好文 时间:
2014-07-24 22:05:32
阅读次数:
213
DescriptionMr. K. I. has a very big movie collection. He has organized his collection in a big stack. Whenever he wants to watch one of the movies, he...
分类:
其他好文 时间:
2014-07-24 21:58:12
阅读次数:
394
值类型转换为引用类型 是装箱 ,存在堆上引用类型转换为值类型 是拆箱 ,存在栈上泛型用一个数据类型 T 来代替object,在类实例化时指定T的类型,运行时(Runtime)自动编译为本地代码,运行效率和代码质量都有很大提高,并且保证数据类型安全。public class Stack { priva...
分类:
其他好文 时间:
2014-07-24 21:23:46
阅读次数:
234
不懂得见算法背包问题详解
代码如下:
#include
struct node
{
int cost;
double wei;
} a[10004];
double min(double a,double b)
{ return a>b? b:a;}
int main()
{
int i,j,n,m;
double dp[10004];
whil...
分类:
其他好文 时间:
2014-07-24 17:44:25
阅读次数:
235
import java.util.Stack;public class StringReverse { public static String reverse1(String s) { int length = s.length(); if (length = 0; i--) revers...
分类:
编程语言 时间:
2014-07-24 14:38:35
阅读次数:
291
题目链接:点击打开链接
gg。。。
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define ll int
#define point Poin...
分类:
其他好文 时间:
2014-07-24 12:24:55
阅读次数:
256