码迷,mamicode.com
首页 >  
搜索关键字:max db_recovery_file    ( 23676个结果
mysql 设置/查看mysql连接数
mysql数据库连接数过多导致系统出错,系统不能连接数据库,关键要看两个数据: 1、数据库系统允许的最大可连接数max_connections。这个参数是可以设置的。如果不设置,默认是100。最大是16384。 2、数据库当前的连接线程数threads_connected。这是动态变化的。 查看ma...
分类:数据库   时间:2014-05-19 07:41:53    阅读次数:532
二分搜索的运用(1最大化最小值)
//#define LOCAL#include#includeusing namespace std;int const MAX_N=10005;int const MAX_M=100;int const INF=100000000;int N,M,x[MAX_N],lb,ub;//判断是否满足条件...
分类:其他好文   时间:2014-05-18 19:38:50    阅读次数:378
并查集
int const MAX_N=100000;int par[MAX_N];//父亲int rank[MAX_N];//树的高度//初始化n个元素void init(int n){ for(int i=0;i#includeint const MAX_N=100000;int const MA...
分类:其他好文   时间:2014-05-18 19:20:37    阅读次数:278
hdu1257
首先求最多能拦截多少颗导弹,则是求一个最长下降子序列的问题。。则找到动态转移方程。。 dp[i]=max(dp[j])+1,ja[i],因为dp[j]所表示的就是一个有序下降子序列。。。所以加进来也将是一个有序上升数列。。 然后是最少需要多少套导弹系统。。。有点贪心的做法。。就是要拦截导弹,尽量用小的去拦截可以拦截的导弹。。最后得到的导弹系统套数是最少的。。 题目链接: http://...
分类:其他好文   时间:2014-05-18 18:31:47    阅读次数:210
已知二叉树的先序遍历序列和中序遍历序列,输出该二叉树的后序遍历序列
题目描述 输入二叉树的先序遍历序列和中序遍历序列,输出该二叉树的后序遍历序列。 输入 第一行输入二叉树的先序遍历序列; 第二行输入二叉树的中序遍历序列。 输出 输出该二叉树的后序遍历序列。 示例输入 ABDCEF BDAECF 示例输出 DBEFCA#include #include #define MAX 50+3 using namespace std; typede...
分类:其他好文   时间:2014-05-18 15:59:41    阅读次数:185
简易版的堆的写法
个人认为重点写出max_heapify和parent_heapify两个函数即可,这个版本内存管理的功能显得特别简单: #include #include using namespace std; class Heap { public: int size, capacity; int *ele; void max_heapify(int i,int heap[],int len...
分类:其他好文   时间:2014-05-18 15:15:29    阅读次数:220
poj 1952 BUY LOW, BUY LOWER 最长下降子序列+统计不重复方案数
dp[i]=max(dp[i],dp[j]+1) ja[i] dp[i]表示长度为i的最长下降子序列的长度。 r[i]表示长度为i的最长下降子序列的方案数。 考虑这样一个问题,比如6 3 9 3,对于两个3,他们数字一样并且dp值也一样,那么r[2]的方案数是没有意义的 因为能通过第一个3扩展的也能通过第二个3扩展,所以直接把r[2]=0。 对于一次扩展若dp[j]+1==dp[i],则...
分类:其他好文   时间:2014-05-18 06:31:43    阅读次数:249
hdu 2159 FATE
题目:     链接:点击打开链接 算法:     二维的完全背包; 思路:     状态转移方程:dp[j][m] = max(dp[j][m],dp[j-b[i]][m-1]+a[i]);表示用j的忍耐度杀死m个怪兽能够得到的最大的经验值。 代码: #include #include #include using namespace std; int dp[110][110];...
分类:其他好文   时间:2014-05-18 03:05:42    阅读次数:338
CF 432B :Football Kit
hash做法:#include#includeconst int Max = 100010;int home[Max],away[Max],hash[Max];int main(){ int n,sum,total; int i,j; while(scanf("%d",&n)!=E...
分类:其他好文   时间:2014-05-17 21:44:37    阅读次数:504
java 产生随机数
package edu.sjtu.erplab.io;import java.util.Random;public class RandomTest { public static void main(String[] args) { int max=20; int...
分类:编程语言   时间:2014-05-17 18:04:42    阅读次数:239
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!