码迷,mamicode.com
首页 >  
搜索关键字:a2    ( 4261个结果
sql 防注入 维基百科
http://zh.wikipedia.org/wiki/SQL%E8%B3%87%E6%96%99%E9%9A%B1%E7%A2%BC%E6%94%BB%E6%93%8ASQL攻击(SQL injection,台湾称作SQL资料隐码攻击),简称注入攻击,是发生于应用程序之数据库层的安全漏洞。简而言...
分类:数据库   时间:2014-08-08 15:52:56    阅读次数:297
HDU 4923 Room and Moor
Problem Description PM Room defines a sequence A = {A1, A2,..., AN}, each of which is either 0 or 1. In order to beat him, programmer Moor has to construct another sequence B = {B1, B2,... , BN} of...
分类:其他好文   时间:2014-08-07 23:18:54    阅读次数:308
HDU 4923 (贪心+证明)
Room and MoorProblem DescriptionPM Room defines a sequence A = {A1, A2,..., AN}, each of which is either 0 or 1. In order to beat him, programmer Moor...
分类:其他好文   时间:2014-08-07 22:53:15    阅读次数:293
hdu 2086 A1 = ?
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2086题目大意:只怪数学不行 网上看到的觉得很好。。。。因为:Ai=(Ai-1+Ai+1)/2-Ci,A1=(A0+A2)/2-C1;A2=(A1+A3)/2-C2,...=>A1+A2=(A0+A2+A...
分类:其他好文   时间:2014-08-07 21:52:34    阅读次数:240
HDU 4927 大数
题意很简单: 对于长度为n的数,做n-1遍,生成的新数列:  b1=a2-a1   b2=a3-a2  b3=a4-a3 c1=b2-b1   c2=b3-b2 ans=c2-c1 最后推出公式:  为n所在行的杨辉三角 对于样例: 3 1 2 3 ans=1*1-2*2+1*3=0 4 1 5 7 2 ans=-1*1+3*5-3*7+1*2=-5 求杨辉三角每个数的时...
分类:其他好文   时间:2014-08-07 19:08:00    阅读次数:289
HDU 4927 Series 1
Problem Description Let A be an integral series {A1, A2, . . . , An}. The zero-order series of A is A itself. The first-order series of A is {B1, B2, . . . , Bn-1},where Bi = Ai+1 - Ai. The ...
分类:其他好文   时间:2014-08-07 18:59:40    阅读次数:248
POJ A Simple Problem with Integers 【线段树,区间更新】
题意:你有N个整数,A1,A2,…,一个。你需要处理两种类型的操作。一种类型的操作是添加了一些给定的数字,每个数字在一个给定的时间间隔。另一种是在给定的时间间隔要求数量的总和。  难点:主要是lazy标记,不好弄懂, 其实lazy标记就是当前改变的值不全部更新,等到用的时候再更新,这样就节省了好多时间。  题目链接:http://poj.org/problem?id=3468 代码: #i...
分类:其他好文   时间:2014-08-07 13:24:40    阅读次数:209
最长非降/下降子序列问题(DP)(待续...)
注意:抽象成以下描述即为最长非降/下降子序列问题(一维状态)问题描述:在一个无序的序列a1,a2,a3,a4…an里,找到一个最长的序列满足:(不要求连续) aiaj>ak…>am,且i= array[i][0] && array[j][1] > len) //注意此处的判断条件 ...
分类:其他好文   时间:2014-08-07 02:59:08    阅读次数:341
最大子段和
一维数组: 有n个数(以下都视为整数),每个数有正有负,现在要在n个数中选取相邻的一段,使其和最大,输出最大的和。[a1,a2,a3................,an].动态规划很容易解决该问题:int maxSum(int a[],int n){ int sum=0; int b=...
分类:其他好文   时间:2014-08-06 22:22:12    阅读次数:187
Light OJ 1356 Prime Independence 最大独立集+素数筛选
题目来源:Light OJ 1356 Prime Independence 题意:给你n个数 选出最多的数构成一个集合使得任何2个数不是另外一个数的质数倍 x!=k*y  思路:矛盾的2个数连边 并且所有数分成质因子数为奇数和偶数两部分 以质因子奇偶不同构建二分图 同奇 同偶的数一定不是另外一个数的质数倍 判断矛盾 首先对每个数因子分解 例如x 有a1个p1质因子 a2个p2质因子...an...
分类:其他好文   时间:2014-08-06 19:09:32    阅读次数:303
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!