/*有数组{2,5,6,11,15,17,22,34,45},将用户输入的任意整数放入数组正确的位 置中,保证顺序不能乱掉。例如:用户输入9,那么数组为{2,5,6,9,11,15,17,22 ,34,45}*/
#includevoid main() { int array[]={2,5,6,11,15,17,22,34,45}; int j=0,tmp=0,m=0; printf("请输入任意一个正整数:"); scanf("%d",&array[10]); fo...
分类:
其他好文 时间:
2014-08-25 20:59:54
阅读次数:
188
http://acm.timus.ru/problem.aspx?space=1&num=1167
有n个马,黑白两种,依次放入k个马厩,将x匹马放在一个马厩的不快乐值为黑马数目*白马数目。问最后的不快乐值最小是多少?
设dp[i][j]表示前i个马厩放了j匹马的最小不快乐值,那么dp[i][j] = min(dp[i-1][g]+tmp[g+1][j])。
其中tmp是预处...
分类:
其他好文 时间:
2014-08-25 17:00:34
阅读次数:
241
同上题#include #include #include #include #include #include using namespace std;int puzzle[10][10];char tmp[100];const int SLOT=0;const int ROW=1;const i...
分类:
其他好文 时间:
2014-08-25 11:42:04
阅读次数:
296
SELECT tmp.user_id, tmp.course_id, tmp.type, tmp.expire_time, @rownum := @rownum + 1,IF ( @course_id = tmp.course_id ,@rank := @rank + 1, @rank := 1) ...
分类:
数据库 时间:
2014-08-25 11:41:34
阅读次数:
275
9阶数独,如上题做#include #include #include #include #include #include using namespace std;int puzzle[10][10];char tmp[15];const int SLOT=0;const int ROW=1;co...
分类:
其他好文 时间:
2014-08-25 11:24:34
阅读次数:
244
Issue:Gem files will remain installed in /tmp/bundler20140825-31835-p0c0p/sqlite3-1.3.9/gems/sqlite3-1.3.9 for inspection.Results logged to /tmp/bundl...
分类:
数据库 时间:
2014-08-25 01:10:23
阅读次数:
284
方法1: #!/bin/bashc=0for i in `seq -w 18 31`;do while [ $c -ge 3 ];do c=$(jobs -p |wc -w) sleep 1s done bash run_cal_us_tmp.sh 201407$i & #echo "`sleep ...
分类:
其他好文 时间:
2014-08-24 23:29:23
阅读次数:
254
1、解压solr[root@svn-servertmp]tar-zxvfsolr-4.7.0.tgz2、将solr包移动到opt目录下:[root@svn-servertmp]mv/tmp/solr-4.7.0/opt/solr3、把exmaple/webapps中的solr.war复制到tomcat[root@svn-servertmp]makdir-p/opt/tomcat/webapps[root@svn-servertmp]cp/opt/solr/example..
分类:
其他好文 时间:
2014-08-23 02:25:30
阅读次数:
183
转自:http://www.opsers.org/base/clean-up-on-the-linux-system-tmp-folder-you-may-want-to-know.html§我们知道,在Linux系统中/tmp文件夹里面的文件会被清空,至于多长时间被清空,如何清空的,可能大家知识的...
分类:
其他好文 时间:
2014-08-22 16:15:39
阅读次数:
194
[hadoop@master~]$sudorpm-ivhMySQL-server-5.6.20-1.el6.x86_64.rpm
rpmdb:PANIC:fatalregionerrordetected;runrecovery安装mysql时候,提示rpmdb错误。google了一下centos的KB,解决思路如下:需要清除rpm的database,保险起见,将/var/lib/rpm目录下的数据做个备份到/home/tmp..
分类:
数据库 时间:
2014-08-22 14:38:09
阅读次数:
381