摘要:
转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents by---cxlove题意:给出一个自动机,给出所有的转移,其中还有一个矩阵,如果(u,c)=0,直接转移,字符c被接收,否则也会转移但是字符c不会被转移,也就是下一个字符依旧是字符c。http://acm.sgu.ru/problem.php?contest=0&problem=201 题意理解了很久。。。。。自动机都给出了状态和转移,显然是个DP。。。但是由于存在(u,c)=1的情况,即字符不变,所以需要预处理一下,得到最终接受字符的状态记忆化搜索即可,可能出现死 阅读全文
posted @ 2013-07-22 20:32
jlins
阅读(266)
评论(0)
推荐(0)
摘要:
网上有不少的这类的文章,以是参照这些文章后,自己实际运行的结果。系统使用的是WIN7 旗舰版。1.打开CMD命令后,连接到SMTP服务器,如连接到QQ的SMTP服务,输入命令 telnet smtp.qq.com 25,见下图,其中25为SMTP协议的默认端口,要了解各协议默认端口后,可以参见http://blog.csdn.net/xxdddail/article/details/9408491。 2.基于SMTP命令的操作,具体请参见下图(附Base64编码解码网站http://base64.xpcha.com/) 注:在与服务器进行身分确认时,如果输入的是helo hello,可出现如下 阅读全文
posted @ 2013-07-22 20:31
jlins
阅读(473)
评论(0)
推荐(0)
摘要:
Problem Description A Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1. F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n>4) = F(n - 1) + F(n-2) + F(n-3) + F(n-4) Your task is to take a number as input, and print that Fibonacci num 阅读全文
posted @ 2013-07-22 20:29
jlins
阅读(186)
评论(0)
推荐(0)
摘要:
算法分析中需要对各种算法进行性能测试,下面介绍两种通用的测试方法,由于只用到标准c语言函数,所以在各种平台和编译器下都能使用。方法1:clock()函数开始计时:start = clock()结束计时:end = clock()start和end都是clock_t类型结果(秒):time = (double)(end - start) /CLOCKS_PER_SEC#include #include #include #include #include using namespace std;inline bool cmp(int a, int b){ return a > b;}con 阅读全文
posted @ 2013-07-22 20:27
jlins
阅读(491)
评论(0)
推荐(0)
摘要:
A Modern JavaScript Date LibraryXDate is a thin wrapper around JavaScript's native Date object that provides enhanced functionality for parsing, formatting, and manipulating dates. It implements the same methods as the native Date, so it should seem very familiar.Also, it is non-destructive to t 阅读全文
posted @ 2013-07-22 20:24
jlins
阅读(256)
评论(0)
推荐(0)
摘要:
//Howard 2013-07-19 //如何检测app是否包含PIE标志? 答:使用xCode自带的otool工具。 otool程序在Xcode.app/Contents/Developer/usr/bin目录下, 假设xCode放在 系统的应用程序目录,它所在是/Applications/Xcode.app/Contents/Developer/usr/bin (1)使用终端,进入otool所在目录: cd /Applications/Xcode.app/Contents/Developer/usr/bin (2)拷贝你编译的.app到该目录 (3)使用命令 ./otool... 阅读全文
posted @ 2013-07-22 20:20
jlins
阅读(402)
评论(0)
推荐(0)
摘要:
paip.数据库发邮件通知配置 作者Attilax , EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn.net/attilax 建立了维护计划--通知操作员,run,失败.. 查看sql,EXECUTE msdb.dbo.sp_notify_operator @name=N'attilax',@subject=N'bek ok2',@body=N'bek ok body2' run,说邮件配置文件没有...但是邮件已经配置了.. google,说agent设置al... 阅读全文
posted @ 2013-07-22 20:17
jlins
阅读(176)
评论(0)
推荐(0)
摘要:
第一种:用CADisplayLink可以实现不停重绘。例子: CADisplayLink* gameTimer; gameTimer= [CADisplayLink displayLinkWithTarget:self selector:@selector(updateDisplay:)]; [gameTimeraddToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; 第二种:int CCApplication::run(){ if (applicationDidFinishLaunching... 阅读全文
posted @ 2013-07-22 20:15
jlins
阅读(905)
评论(0)
推荐(0)
摘要:
Problem Description Given a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbour of A[n] is A[1]. Now your job is to calculate the max sum of a Max-K-sub-sequence. Max-K-sub-sequence means a continuous non-empty sub-sequence wh. 阅读全文
posted @ 2013-07-22 20:14
jlins
阅读(180)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2013-07-22 20:11
jlins
阅读(1279)
评论(0)
推荐(0)
摘要:
Problem Description For years, computer scientists have been trying to find efficient solutions to different computing problems. For some of them efficient algorithms are already available, these are the “easy” problems like sorting, evaluating a polynomial or finding the shortest path in a graph. F 阅读全文
posted @ 2013-07-22 20:09
jlins
阅读(204)
评论(0)
推荐(0)
摘要:
题目给了512MB的空间....用dp[k][i]代表以k为起点...往下面走(走直的不打岔)i步能有多少方案....在更新dp[k][i]过程中同时统计答案.. Program:#include#include#include#include#include#include#include#define ll long long#define oo 1000000007#define MAXN 50005using namespace std;struct node{ int x,y,next;}line[MAXN*2];int n,K,dp[MAXN][502],_next... 阅读全文
posted @ 2013-07-22 20:07
jlins
阅读(221)
评论(0)
推荐(0)
摘要:
原创文章,转载请注明出处:http://blog.csdn.net/donny_zhang/article/details/9408285demo功能:ios 在一定范围随机选取demo,如截屏。在点击按钮的时候,程序会根据按钮选项的范围随机抽取一个选项显示。iphone 6.1测试通过。demo说明:项目demo中 MainView.m里是主要代码。利用rand()来产生随机数。rand()的作用是随机返回一个类型为int的整数,其范围是0到RAND_MAX。demo截屏: demo主要代码://按钮响应事件- (IBAction)abcd {//radn()产生随机数,取4的模。所以 rN 阅读全文
posted @ 2013-07-22 20:06
jlins
阅读(338)
评论(0)
推荐(0)
摘要:
... 阅读全文
posted @ 2013-07-22 20:03
jlins
阅读(1931)
评论(1)
推荐(0)
摘要:
式子是很好推的,只是当时不知道如何去控制精度问题。要知道P的N次方是很小的一个数。最后的式子很简单的for(int i=0;i#include #include using namespace std;double solve(int n,double p){ double ans=p*n;//因为最后还要去看看第一个箱子,所以最后还是得乘以一个P的 double last=1;//递推的一个中间变量 for(int i=1;i<=n;i++) { last*=(n+i)*(1-p)/i*p;//因为每个中间式子都要乘以N个P,所以每个新生成的中间式子都要... 阅读全文
posted @ 2013-07-22 20:01
jlins
阅读(168)
评论(0)
推荐(0)
摘要:
这道题是看了别人的思路才做出来的。刚看完这道题没什么思路,线段的长度是10^5,操作指令数是10^5,还要记录不同颜色种类数,觉着怎么写肯定都是要超时。我当时在节点里增加了一个数组记录已经出现的颜色数,硬着头皮写了一个代码,提交后无悬念TLE。后来又想着单纯的做一个延迟标记,让更新的节点效率达到最高,访问的话直接在一次访问中访问所有的叶节点,这样的话相当于增加了查询的消耗,降低了更新的消耗。想了想,觉得这样虽然能提高不少效率,但是离能过还有段儿距离。我去看了一下别人的代码,看到这个思路,这个思路跟我第二次的想法有点儿类似,不过做了一个很强大的优化,如果节点中的num是-1的话,表示在这个节点下 阅读全文
posted @ 2013-07-22 19:59
jlins
阅读(386)
评论(0)
推荐(0)
摘要:
转载请标明出处:http://blog.csdn.net/android_ls/article/details/9405089声明:仿人人项目,所用所有图片资源都来源于其它Android移动应用,编写本应用的目的在于学习交流,如涉及侵权请告知,我会及时换掉用到的相关图片。 这一篇在 Android仿人人客户端(v5.7.1)——个人主页(二) 的基础上,继续和大家聊一聊剩下部分的实现思路,以及对已完成部分做的一些调整。 有关 好友个人主页的在前两篇已和大家聊过了,这篇重点是和大家聊下有关当前登录用户的个人主页的实现。一、代码结构的调整 我去人人官方开放平台查看API时,发现有提供新... 阅读全文
posted @ 2013-07-22 19:57
jlins
阅读(2914)
评论(0)
推荐(0)
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2554假设所有的2n个数据的位置分别从1~2n标号。现在假设其中第ai个数据(双胞胎),和bi。那么他们的位置则相差i + 1个位置;同理,那么所有n组双胞胎相差的数据sum( bi - ai ) ( i = 1 ......2n ) = 2 + 3 +4 + .........+ n + n + 1 = n ( n + 3 ) / 2 ;所有位置的和sum( ai + bi ) = ( 1 + 2 *n ) * 2 * n / 2 ;又因为sum( 2 * ai + bi - ai ) = 2sum( ai 阅读全文
posted @ 2013-07-22 19:55
jlins
阅读(256)
评论(0)
推荐(0)
摘要:
Description There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish only a surface track. Moreover, it turned out that the station could be only a 阅读全文
posted @ 2013-07-22 19:52
jlins
阅读(277)
评论(0)
推荐(0)
摘要:
1: 打印包括字段在内的实例的完整信息 同 %+V fmt.Printf("Hello world! %v","hufeng") 输出:Hello world! hufeng 2:打印包括字段和限定类型名称在内的实例的完整信息 fmt.Printf("Hello world! %#v","hufeng") Hello world! "hufeng" 3:打印某个类型的完整说明 fmt.Printf("Hello world! %T","hufeng") H 阅读全文
posted @ 2013-07-22 19:50
jlins
阅读(326)
评论(0)
推荐(0)

浙公网安备 33010602011771号