自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(37)
  • 收藏
  • 关注

原创 【网络编程】网络IO模型2-非阻塞式IO

本文介绍网络IO五大经典模型-非阻塞式IO

2022-07-31 23:43:56 418

原创 【网络编程】网络IO模型1-阻塞式IO

Input/Output(I/O或者IO)在维基百科中,Input/Output被定义为。比如一个电脑和另一个电脑之间的通信,人与电脑的通信。I是某系统接收的信号或者数据,O则是从该系统输出出来的数据。今天要讲的IO是网络IO,一般都是电脑与电脑之间,调制解调器和网卡之间的。网络IO一共分为5类,其中最基础的就是阻塞式(BlockingIO)模型。...

2022-07-31 23:12:11 419

原创 【基础】版本管理利器git

git是一种分布式版本管理工具,它记录的是文件变更列表。git可以管理一个仓库,对仓库里面所有的文件增改删都可以用git来跟踪记录。我们可通过git查看所有的记录,还可以通过git来还原之前的版本记录。有gitadd,gitcommit,gitcheckout,gitpush等常用指令。当然我们还会经常用到gitrm--cashed。SVN也是一种开源的版本控制系统。这些数据可以放在中央资料档案库中,有checkout,commit,update等指令。git的文件权限控制。.........

2022-07-31 22:05:29 743

原创 【C基础】Makefile(含.phony的作用)和CMake

该文介绍了makefile和cmake的一些简单样例

2022-07-31 13:58:27 722

原创 数据结构基础-B树的实现

B树是重要的数据结构。我们用C语言如何实现,是非常关键的。它的规则严格,所以一步一步都要严格按照规则来。

2022-07-31 12:42:56 1034

原创 EasyUI(二)

其中 success:function(data) 中的data是一个参数

2016-07-01 17:20:50 245

原创 EasyUI 学习笔记(一)

EasyUI是一个强大的,优雅的学习框架 function initBaseInfo() { $('#customer0').validatebox({required : true}); $('#customerTel0').validatebox({required : true}); if (null != '${model.customer}' && '' != '${mod

2016-07-01 16:44:30 347

原创 Eclipse待解决零碎问题2

信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:  C:\Program Files\Java\jdk1.8.0_60\bin; C:\WINDOWS\

2016-06-30 09:47:06 229

原创 Eclipse未解决的零碎小问题

A:我从svn下载的项目里,总有一些lib里面的jar包的图标没有变色,总要通过build path来解决问题。这是为什么? B:百度了下,说是左下角有小logo的是已经在项目引用中了,没有的就没引用进来。 B:你Java Build Path,点击Libraries看看 。 B:环境变了  A:环境变了跟这个有什么关系呢 B:在最开始的环境下项目里引用了本地的jar包,

2016-06-30 09:07:56 311

原创 【安装】myEclipse

myEclipse-8.6文件夹中包含了 -configuration -dropins (放插件的文件夹,方法是放入link文件,link文件里面保存插件地址。ps:地址的格式为 “path= X://XXX//XXX”) -readme .eclipseproduct epl-v10.html myeclipse.exe myeclipse.ini notice.html

2016-06-28 09:48:35 223

原创 【matlab】向量公式集

向量:a,b a = [x1, x2, x3, x4, ... , yn] b = [y1, y2, y3, y4, ... , yn]

2016-04-10 11:44:35 483

转载 迭代器-Collection

import java.util.*; class test1 { @SuppressWarnings("unchecked")//抑制警告(单类型警告,用法http://www.cnblogs.com/fsjohnhuang/p/4040785.html) public static void test1_array()//静态方法 { Collection c = n

2015-09-03 16:16:10 363

原创 mysql环境配置

安装mysql的过程请看以下链接 http://jingyan.baidu.com/article/48b558e37c20e77f38c09a16.html 安装好mysql之后,如果想使用命令行启动mysql,则需要配置环境变量,本文将介绍文字版说明,图解版说明,以及解释为什么要这样配置环境变量的原因,这个原因对于jdk的环境变量配置也是一样的效果,不再赘述,以期达到今后配置环境变量不

2014-12-27 01:06:55 494

转载 [数论zoj]

数论-构造问题 Flip and Shift--ZOJ Problem Set - 1028 Q:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1028 A:http://www.cnblogs.com/scau20110726/archive/2013/06/12/3133078.html

2014-03-05 20:24:11 156

原创 并查集

1畅通工程 http://acm.hdu.edu.cn/showproblem.php?pid=1232 #include using namespace std; const int maxn=1000; int par[maxn+1]; void init(int n) { int i; for(i=1;i<=n;i++) { par[i]=i;

2014-01-06 20:56:54 719

原创 【树】根据前序序列和中序序列写出二叉树

首先感谢小健健学长的帮助, 用数组实现 前序序列char pre[100]="dacebhfgi"; 中序序列char mid[100]="dcbehagif"; /*根据前序序列和中序序列写出二叉树序列*/ #include #include #include using namespace std; const int maxn=1000; char pr

2013-12-11 14:11:43 1263

原创 xianduanshu

#include using namespace std; const int maxn=50010; int n; struct  Tree{    int l,int r,int num; }tree[maxn void pushup(int r) { tree[r].num=tree[r } void build(int l,int r,

2013-12-06 20:59:05 179

原创 Codeforces Round #216 (Div. 2)

A #include # using namespace std; int main() { int n,m,k,l1=0,l2=0,sum=0; cin>>n>>m>>k; while(n--) { int a; cin>>a; if(a==1) m--; if(a==2) {if(k>0

2013-11-30 03:41:09 571

原创 质数判断

bool isprime(int t) { int i; if(t==2) return 1; for( i=2;i if(t%i==0) return 0; return 1; }

2013-11-30 03:35:48 145

原创 hdu 2003 保留两位小数

#include #include using namespace std; int main() { double t; while(cin>>t) { if(t<0) t=-t; double x=(long long )(t*100.00+0.5)/100.00; cout <<setprecision(2) <<std::fixe

2013-11-27 10:36:22 131

原创 Codeforces Round #201 (Div. 2)

1.A. Difference Row #include #include using namespace std; const int m=120; int a[m],e[m]; int main() { int n,min1=1005,max1=-1005; cin>>n; for(int i=0;i<n;i++) {cin>>a[i];}

2013-09-25 11:17:46 208

原创 搜索题方法总结

1,。深度搜索中   图的遍历。 八个方向,dx,dy代表位移,则可以 for(int dx=-1;dx   for(int dy=-1;dy       {            int nx=x+dx;int ny=y+dy;          if(0=0&&ny        } 2擅长于写solve() 习惯问题,不过主函数尽量越短越好。

2013-09-13 15:11:40 306

转载 扩展欧几里得算法

用类似辗转相除法,求二元一次不定方程47x+30y=1的整数解。 47=30*1+17 30=17*1+13 17=13*1+4 13=4*3+1 然后把它们改写成“余数等于”的形式 17=47*1+30*(-1) //式1 13=30*1+17*(-1) //式2 4=17*1+13*(-1) //式3 1=13*1+4*(-3) 然后把它们“倒回去” 1=13*1+4*(

2013-08-16 14:45:20 597

转载 c++的引用(未完成)

引用能起到指针的部分作用,但是比指针安全. 一个引用可以看作是某个变量的一个"别名"。对引用进行操作就像对原变量进行操作一样。 主要用于函数的参数传递时使用。因为C语言没有类似VB的“传引用调用”这个功能,所以C++的引用填补了这个空白。从此即使需要改动参数,也直接传递一个变量过去即可。这在操作符重载中有更重要的意义。等你学到以后才会明白。 int a; //声明变量a int& ra =

2013-08-16 14:12:11 534

转载 C语言中scanf()的用法!

好文章转自:http://blog.tianya.cn/blogger/post_show.asp?BlogID=287129&PostID=3668453 scanf详解   scanf 原型:       # include    int scanf( const char *format, ... );        函数 scanf() 是从标准输入流 stdin 中读内容的

2013-08-15 23:36:26 887

原创 floyd

感谢每一位帮助我的人,谢谢你们! #include #include using namespace std; const int maxn = 205; const int INF = 999999999; int a[maxn][maxn]; int main() { int i, j,n,m,q; while(scanf("%d%d",&n,&m)==2) {

2013-08-12 13:22:11 519

原创 Codeforces Round #194 (Div. 2) A. Candy Bags

#include #include using namespace std; int a[1000000]; int main() { int n; cin>>n; int t=n*n,j=1,k,l,m=t; for(int i=1;i<=n*n;i++) a[i]=i; for(j=1;j<=(n*(n-1)/2+1)

2013-07-31 15:56:52 772

原创 一道cf水题的思考A. Lucky Division

A. Lucky Division http://codeforces.com/problemset/problem/122/A 这水题引起了我的深度(= =)思考 幸运数是 1.每个数字都是4或7,2。或能被幸运数整出 首先,我第一次提交,发现我代码想错了,幸运数不仅仅能被4,7整除,而且还能够被幸运数字整除,比如47,74,44,77...... 问题来了,这些幸

2013-07-27 16:21:46 232

原创 VK Cup 2012 Qualification Round 1--C. Cd and pwd commands

好代码就是用来欣赏的 time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Vasya is writing an operating system

2013-07-27 12:48:57 1168 1

原创 算法入门经典--图论--黑白图

/*输入一个n*n的黑白图像,(1代表黑色,0代表白色),任务是统计其中八连块的个数。 如果两个黑格子有公共边或者公共定点,就说他们属于一个八连块。*/ #include #include #include using namespace std; const int maxn =100;//注意 int mat[maxn][maxn],vis[maxn][maxn];//mat[][]是图

2013-07-26 17:21:10 1224

原创 算法入门经典--二叉树

今天终于把算法入门经典的二叉树例题给看懂了。 但是,里面有几个关键的小点我至今都不太懂: 1.以下代码1中会出现“1K>>D k*2^D这是为什么呢?这来自哪个知识点,有大神可以告诉我么...? 2.《算法入门经典》-二叉树(第101页)的代码(下面的第二段代码),有一段话我感觉很疑惑。 书中原话: 如果使用题目中给出的编号I,则当I是奇数时,它是往左走的第(I+1)/2个小球;当I是偶数

2013-07-25 16:51:08 1027

原创 Codeforces Round #193 (Div. 2) 一道水题的翻译

心情小记:第一次参加codeforce网赛,对于我这种英语拙技的人来说对于这道题目的理解简直要了我的老命,于是我果断放弃了...... 尤其是俄式英语,看多了中式英语的我快疯了。 但这道题弄懂了以后,居然出奇的水。。。 对于我来说这道题 以下是我的翻译 几个变量: n 是人的个数。 bi 是每个人的编号范围是0~n-1 j  是游戏的次数              

2013-07-25 16:42:41 1028

原创 7.1.4双基回文数 by基友组

#include using namespace std; int main() { int x,n,a[9][100],i,j,m,k,t; cin>>x; for(n=x;;n++) { t=0; for(i=0;i<9;i++) { m=n; j=0; while(m) { a[i

2013-07-24 17:56:03 913

原创 cf water

男女排队,男的排在女的后面#include #include using namespace std; int main() { char a[51],k; int x,b,i; cin>>x>>b>>a; while(b--) { for(i=0;i<x-1;i++) { if(a[i]<a[i+1]) {

2013-07-24 16:45:49 848

原创 codeforce小水题--A. Presents

思路:a[i]=k-->a[k]=i;  that  a[b[i]]=i#include #include using namespace std; int main() { int a[105],b[105],t,i,k; cin>>t; for(i=1;i<t+1;i++) scanf("%d",&a[i]); for(i=1;i<t+1;i++)

2013-07-24 16:24:52 832

原创 A. Nearly Lucky Number

这道水题在涛神的帮助下顺利过关,一下是几个泪点 1,英语不过关:In the second sample there are 7 lucky digits, 7 is lucky number, so the answer is "YES".它指的是7位数,digit位数,如果位数是幸运数字则输出,这个没考虑到 2,这个lucky number不一定全都是幸运数字,4444000.77

2013-07-24 15:57:38 939

原创 欧拉计划

#include #include const int maxn=1000; int f[maxn]; int main() { int i,j,n; int sum=0; memset(f,0,sizeof(f)); f[0]=1; int c=0; for(i=0;i<1000;i++){ for(j=0;j<1000;j++

2013-07-17 11:05:19 802

空空如也

空空如也

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

TA关注的人

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