自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(230)
  • 收藏
  • 关注

转载 /lib64/libc.so.6: version `GLIBC_2.14' not found问题

<备忘>参考文章:https://my.oschina.net/zhangxu0512/blog/262275问题答疑:http://blog.sina.com.cn/s/blog_53c061270101cxxr.html转载于:https://www.cnblogs.com/crazyapple/p/5885400.html...

2016-09-19 15:40:00 248

转载 mysql 触发器的使用(备忘)

触发器创建语法四要素:1.监视地点(table)2.监视事件(insert/update/delete)3.触发时间(after/before)4.触发事件(insert/update/delete)语法:create trigger 触发器名称after/beforeinsert/update/deleteon表名for each ro...

2016-06-02 15:42:00 157

转载 mysql 存储过程 -- 游标的使用(备忘)

BEGIN DECLARE f_leastCount INT DEFAULT 100; DECLARE f_ratio FLOAT DEFAULT 0.8; DECLARE i_channel VARCHAR(64); DECLARE i_appVersionName VARCHAR(64); DECLARE i_statDate...

2016-06-02 14:58:00 161

转载 java导出excel表格

java导出excel表格:1、导入jar包<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.5-FIN...

2016-05-13 15:33:00 143

转载 java调用http请求json

最近遇到的问题,java如何调用http请求json:public class HttpClientUtil { private static final String CONTENT_TYPE_TEXT_JSON = "text/json"; private static final String APPLICATION_JSON = "applicatio...

2016-05-13 15:21:00 120

转载 elasticsearch查询之term,range,prefix

荒废了很久的博客园,现在又回来了。233333最近在研究elasticsearch日志查询:1、term:代表完全匹配,即不进行分词器分析,文档中必须包含整个搜索的词汇2、range:主要是对字段进行过滤筛选,可以是数字和字符串类型3、prefix:前缀匹配{ "query": { "filtered": { ...

2016-05-13 15:12:00 156

转载 怎么将java项目打包成双击就可以运行的jar包---fatjar

fatjar下载地址:http://pan.baidu.com/s/1cQ01o下载fatJar插件,解压缩后是一个.../plugins/(net...)把plugins下面的(net..)文件夹拷贝到eclipse的plugins下,重新启动Eclipse3.1,Windows=>prefernce=>fat jar preference看到他就说明已经安装成功了。如...

2013-12-11 13:37:00 230

转载 hdu 2629 Identity Card (字符串解析模拟题)

这题是一个字符串模拟水题,给12级学弟学妹们找找自信的,嘿嘿;题目意思就是要你讲身份证的上的省份和生日解析出来输出就可以了:http://acm.hdu.edu.cn/showproblem.php?pid=2629 1 #include <iostream> 2 #include <string> 3 using namespace st...

2013-12-10 14:34:00 7663

转载 求最远点对,输出距离

1 #include<iostream> 2 #include <math.h> 3 #include <algorithm> 4 #include<stdio.h> 5 6 using namespace std; 7 8 #define eps 1e-8 9 #define zero(x) ((...

2013-11-13 20:01:00 203

转载 poj 2299 求逆序数

1 #include <iostream> 2 const int MAX = 500000; 3 int a[MAX]; 4 int swap[MAX]; //临时数组 5 int n; //数组a的长度 6 __int64 result; //数组a中的逆序数 7 8 /...

2013-11-09 14:35:00 78

转载 bnuoj 25659 A Famous City (单调栈)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=25659 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 #include <math.h> 5 #include <algor...

2013-11-04 16:38:00 128

转载 bnuoj 25662 A Famous Grid (构图+BFS)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=25662 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 #include <math.h> 5 #include <...

2013-11-04 16:36:00 123

转载 环形字符串求最小字典序

#include<iostream>#include<stdio.h>#include<string.h>using namespace std;char str[20000];int work(int m){ int i,j,l; i=0; j=1; while(i<m &&am...

2013-10-30 17:13:00 223

转载 bnuoj 4207 台风(模拟题)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=4207【题意】:中文题,略【题解】:模拟【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <algorithm> 4 5 using ...

2013-10-10 19:30:00 235

转载 bnuoj 4208 Bubble sort

http://www.bnuoj.com/bnuoj/problem_show.php?pid=4208【题意】:如题,求冒泡排序遍历趟数【题解】:这题开始2B了,先模拟TLE,然后想了一下,能不能根据始末状态来得到点什么。。。    3 24 1         |==>如果开始的位置在 i 最后位置在 j ,如果 i>j那么最少遍历次数为 i...

2013-10-10 19:28:00 120

转载 bnuoj 4209 Triangle(计算几何)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=4209题意:如题题解:公式直接计算,或者角平分线求交点【code1】: 1 #include <iostream> 2 #include <math.h> 3 #include <string.h> 4 #include &...

2013-10-10 19:12:00 120

转载 bnuoj 33656 J. C.S.I.: P15(图形搜索题)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=33656【题解】:暴力搜索题【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 #include <algorith...

2013-10-05 15:06:00 161

转载 bnuoj 33648 Neurotic Network(树形模拟题)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=33648【题解】:结果先对MOD*2取模,才能得到结果是否是正确的奇偶问题,得到最后结果之后再对MOD取模。。。【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <...

2013-10-05 14:57:00 82

转载 bnuoj 33647 Angry Grammar Nazi(字符串)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=33647【题意】:字符串匹配,暴力配就行了【题解】:截出单词,然后进行匹配就行了【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h>...

2013-10-05 14:50:00 81

转载 bnuoj 16493 Just Pour the Water(矩阵快速幂)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=16493【题解】:矩阵快速幂【code】: 1 #include <cstdlib> 2 #include <cstring> 3 #include <cstdio> 4 #include <iostream&gt...

2013-10-04 14:31:00 73

转载 bnuoj 29368 Check the Identity(栈)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=29368【题解】:模拟,然后对x,进行枚举,看是否所有都满足条件【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <math.h> 4 #incl...

2013-10-04 14:28:00 69

转载 bnuoj 29373 Key Logger(模拟双向队列)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=29373【题意】:模拟光标输入【题解】:用双向列表模拟实现,这里用其他模拟会超时,注意内存的释放【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <math.h...

2013-10-04 14:24:00 74

转载 bnuoj 29375 Two Strings(字符串?)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=29375【题意】:可以对两字符串进行如下操作:  1、可以无损耗交换相邻两个字符(可以理解成交换任意字符) 2、可以改变一个字符 x->y,花费为 x-y 的绝对值 求花费最少,将两字符串变成一样【题解】: 排序字符串,然后对应相减【c...

2013-10-04 14:18:00 54

转载 Contest2037 - CSU Monthly 2013 Oct(中南大学2013年10月月赛水题部分题解)

Problem A: Small change题解:http://www.cnblogs.com/crazyapple/p/3349469.htmlProblem B: Scoop water题解:http://www.cnblogs.com/crazyapple/p/3349478.htmlProblem D: CX and girls题解:http://www.c...

2013-10-02 17:29:00 99

转载 Contest2037 - CSU Monthly 2013 Oct (Problem J: Scholarship)

http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=9【题解】:  这题卡了一下,卡在负数的情况,负数输出 0  这题主要找到一个个相邻重复的位置,然后加1上去,看是否进位,直到满足条件为止【code】: 1 #include<iostream> 2 #includ...

2013-10-02 17:20:00 81

转载 Contest2037 - CSU Monthly 2013 Oct (problem F :ZZY and his little friends)

http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=5【题解】:没想通这题暴力可以过。。。。【code】: 1 #include<iostream> 2 #include<stdio.h> 3 #include<string.h> 4 using ...

2013-10-02 17:14:00 120

转载 Contest2037 - CSU Monthly 2013 Oct (problem D :CX and girls)

【题解】:最短路径问题,保证距离最短的同时,学妹权值最大,哈哈【code】: 1 #include<iostream> 2 #include<queue> 3 #include<stdio.h> 4 #include<string.h> 5 #include<stdlib.h> 6...

2013-10-02 17:13:00 88

转载 Contest2037 - CSU Monthly 2013 Oct (problem B :Scoop water)

http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=1【题解】:卡特兰数取模h(n) = h(n-1)*(4*n-2)/(n+1)这题我们公式选择错了,不过还是能AC的因为要取模,应该选 h(n)=h(0)*h(n-1)+h(1)*h(n-2)+...+h(n-1)*h(0) (n>=2)...

2013-10-02 17:10:00 79

转载 Contest2037 - CSU Monthly 2013 Oct (problem A :Small change)

【题解】:二进制拆分    任意一个整数都可以拆分成 2^0 + 2^1 + 2^2 + 2^3 + ....+ m【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 #include <math.h> 5 ...

2013-10-02 17:02:00 71

转载 bnuoj 1057 函数(模拟)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=1057【题意】:给定x的值,带入f(x)求函数值【题解】:注意第一个数的符号可能是'+',这里把我坑死了。。。【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include &lt...

2013-09-30 20:09:00 100

转载 bnuoj 1053 EASY Problem (计算几何)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=1053【题意】:基本上就是求直线与圆的交点坐标【题解】:这种题我都比较喜欢用二分,三分做,果然可以完爆,哈哈,特有成就感的说。。。【code】: 1 #include <iostream> 2 #include <stdio.h> 3...

2013-09-29 22:18:00 68

转载 bnuoj 4187 GCC (数论)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=4187【题意】:如题【题解】:取n,m的最小值进行遍历就可以了: 注意 0 1 这组测试数据【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h...

2013-09-28 15:07:00 69

转载 bnuoj 27987 Record of the Attack at the Orbit (模拟)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=27987【题意】:给定坐标输出图形【题解】:处理坐标上的小技巧【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 #inclu...

2013-09-27 16:21:00 63

转载 bnuoj 4225 杨辉三角形(规律)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=4225【题意】:给定任意杨辉三角的行数n,请输出杨辉三角中前n行中总共有多少偶数。【题解】:  找规律:1为奇数 0为偶数 打出表1111011111100011100111010101111111111000000011100000011101000001011111...

2013-09-26 14:56:00 107

转载 bnuoj 31796 键盘上的蚂蚁(搜索模拟)

http://www.bnuoj.com/bnuoj/contest_show.php?cid=2876#problem/31796【题意】:  如题,注意大小写情况【code】: 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4...

2013-09-25 17:59:00 85

转载 bnuoj 27874 "Center" of [p]erimeter midpoints(计算几何)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=27874【题意】:给你一个三角形三个顶点的坐标ABC,三角形各边取一点DEF,将三角形周长平均分割成两部分,求AE,DC,FB是否相交于一点,是,输出交点坐标,否,输出ERROR【题解】:几何体,一看就有点慌,就怕它卡精度,以前坑怕了,这里给出思路以及解题过程:先求出DE...

2013-09-24 17:19:00 85

转载 bnuoj 20838 Item-Based Recommendation (模拟)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=20838【题意】:  有点长,略。【code】:   1 #include <iostream> 2 #include <stdio.h> 3 #include <string> 4 #include <strin...

2013-09-23 17:43:00 79

转载 bnuoj 20832 Calculating Yuan Fen(暴力模拟)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=20832【题意】:给你一串字符串,求一个ST(0<ST<=10000),对字符串中字符分别加上(ST-'A'),然后得到的数组分别连起来组成字符串,相邻两个字符相加,取各位数,赋值到下一行,每行讲减少一个字符,直到出现3个字符为100时,输出这时候的ST【题解】:完全...

2013-09-23 17:38:00 140

转载 bnuoj 20834 Excessive Space Remover(水水)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=20834【题意】:每次减少一半的空格,问经过多少次操作能得到每个单词之间的空格为1,输入字符串大小小于等于1MB【题解】:1、如果单词之间最大的空格数为2的n次方,那么输出22、否则输出n+1注意字符串大小1MB,这里用C++中string进行处理【code】: 1 #in...

2013-09-23 17:19:00 672

转载 bnuoj 1071 拼图++(BFS+康拓展开)

http://www.bnuoj.com/bnuoj/problem_show.php?pid=1071【题意】:经过四个点的顺逆时针旋转,得到最终拼图【题解】:康拓展开+BFS,注意先预处理,得到所有状态,然后用hash来调用存在的状态【code】: 1 #include <iostream> 2 #include <stdio.h>...

2013-09-21 19:40:00 126

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除