先贴代码,以后再写题解。。。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 typedef long long ll; 8 9 ll s[100];10 11 ll init (int n){...
分类:
其他好文 时间:
2014-07-31 20:26:37
阅读次数:
206
如果求出第一种情况的逆序列,其他的可以通过递推来搞出来,一开始是t[1],t[2],t[3]....t[N]它的逆序列个数是sum个,如果把t[1]放到t[N]后面,逆序列个数会减少t[1]个,相应会增加N-(t[1]+1)个 1 #include 2 #include 3 using name.....
分类:
其他好文 时间:
2014-07-31 20:21:17
阅读次数:
270
function aa(i){ var tm = setInterval(function(){ var t = $(window).scrollTop(); var d = i < t ? Math.min((i-t)/10, -1) : Math.max((i-...
分类:
Web程序 时间:
2014-07-31 20:19:07
阅读次数:
185
本学习笔记是C++ primer plus(第六版)学习笔记。是C++学习笔记(1)的后续。复习C++基础知识的可以瞄瞄。转载请注明出处http://www.cnblogs.com/zrtqsk/p/3878593.html,谢谢!如下。第五章1、for循环——for(initialization;...
分类:
编程语言 时间:
2014-07-31 19:35:57
阅读次数:
266
#!/bin/sh
if [ -z "`curl --connect-timeout 15 --max-time 20 --head --silent http://localhost/index.php|head -n 1|grep ‘200‘`" ];then
echo -e "$(date +%Y-%m-%d)\n"
killall nginx
killall...
分类:
Web程序 时间:
2014-07-31 17:23:50
阅读次数:
301
代码:#include #include using namespace std; int a[1005], dp[1005]; int main() { int n,sum,i,j; while( scanf("%d",&n)&&n){ for( i=0; ia[j]) dp[i]=max...
分类:
其他好文 时间:
2014-07-31 16:42:26
阅读次数:
151
#include #include #include #define MAX 27typedef struct node{ int v; struct node *next[MAX];}Trie;Trie *root;void creatTrie(char *str){ int i...
分类:
其他好文 时间:
2014-07-31 16:23:26
阅读次数:
212
线段树 1 #include 2 #include 3 using namespace std; 4 #define N 200010 5 int sum[N]; 6 void build(int l,int r,int root){ 7 if(l==r)scanf("%d",&sum...
分类:
其他好文 时间:
2014-07-31 16:21:47
阅读次数:
200
IE6支持兼容min-width、max-width CSS样式属性让IE6支持max-width、IE6支持min-width样式(体感音乐)我们在写CSS的时候,常常会遇到让一个图片或一个布局不能超出设定一定宽度范围值,有时需要设置一个最小宽度,接下来由DIVCSS5为大家总结的解决IE6不支持...
分类:
Web程序 时间:
2014-07-31 16:21:26
阅读次数:
239
//scrollTop;var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);// 屏幕可视区高度var viewHeight = document.compatMod === 'C...
分类:
编程语言 时间:
2014-07-31 16:16:46
阅读次数:
229