题目链接:HDU 1394 Minimum Inversion 
Number【题意】给你一个1~N的数字组成的初始序列,然后每一次都将第一个数字移到最后,形成新的序列,然后求出这些序列的逆序数中的最小值。【思路】开始可以用任意一种方法(线段树 
or 暴力 or 树状数组)计算出初始数列的逆序数sum...
                            
                            
                                分类:
其他好文   时间:
2014-05-19 09:50:31   
                                阅读次数:
282
                             
                    
                        
                            
                            
                                mysql数据库连接数过多导致系统出错,系统不能连接数据库,关键要看两个数据: 
1、数据库系统允许的最大可连接数max_connections。这个参数是可以设置的。如果不设置,默认是100。最大是16384。 
2、数据库当前的连接线程数threads_connected。这是动态变化的。 查看ma...
                            
                            
                                分类:
数据库   时间:
2014-05-19 07:41:53   
                                阅读次数:
532
                             
                    
                        
                            
                            
                                oracle使用LEFT JOIN关联产生的问题在查询结果中使用CASE WHEN 
无法判断查询方式一: 1 SELECT 2 CASE WHEN (SELECT CAST(SUM(CASE 3 WHEN 
(ALLOCABLE_PRIME_CURRENCY_VALUE IS NULL AND ST....
                            
                            
                                分类:
数据库   时间:
2014-05-18 20:08:35   
                                阅读次数:
1129
                             
                    
                        
                            
                            
                                //#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
                             
                    
                        
                            
                            
                                Given a triangle, find the minimum path sum 
from top to bottom. Each step you may move to adjacent numbers on the row 
below.For example, given the fol...
                            
                            
                                分类:
其他好文   时间:
2014-05-18 02:11:19   
                                阅读次数:
302
                             
                    
                        
                            
                            
                                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
                             
                    
                        
                            
                            
                                原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1425 
DP题。 f[i][j]表示当前数字为i,分解式中最大质数为j的方案数,那么,状态转移方程为: f[i][j] = sum(f[i-j][k]) 其中...
                            
                            
                                分类:
其他好文   时间:
2014-05-17 20:41:17   
                                阅读次数:
296
                             
                    
                        
                            
                            
                                1 //Accepted 250MS 2480K 2 #include 3 #include 4 
const int MAXN = 50005; 5 struct node 6 { 7 int l,r; 8 int add,sum; 9 
}f[3*MAXN];10 int n;...
                            
                            
                                分类:
其他好文   时间:
2014-05-17 20:36:37   
                                阅读次数:
316
                             
                    
                        
                            
                            
                                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