自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(71)
  • 资源 (7)
  • 收藏
  • 关注

转载 个人学习的链接

maven配置springbatch

2016-10-30 20:56:22 254

原创 java 线程间通信同步代码块

import java.lang.*;class Res{ String name; String sex; boolean flag=false; public synchronized void set(String name,String sex) { if(flag) try { this.wait(); } catch (Except

2016-08-30 21:13:33 331

原创 指针复习之单链表实现

#include#include#includetypedef struct node{ int data; struct node *next;} node;node *init(){ node *head; head=(node*)malloc(sizeof(node)); head->next=NULL; return head;

2016-08-23 15:53:22 299

原创 程序员必学的linux命令(1)

1.cp -airusdf2.rm -fir(recursion)(\rm -r 不需要询问) (rm -aaa- -> rm ./-aaa-or rm -- -aaa-)3.rmdir 空目录4.mv -fiu (也有重命名)=rename5.basename(取得文件名),dirname(取得目录名)6.cat -n7.tac8.nl9.more10.od

2016-08-17 20:55:36 392

转载 Linux init命令

切换执行等级: init本章上头有谈到过关亍 run level 的问题。乀前谈到的是系统运作的模式,分为纯文本(run level 3)及图形接口模式(run level 5)。除了这两种模式外,有没有其他模式呢?其实 Linux 共有七种执行等级, 七种等级的意丿我们在后面会再谈到。本章你只要知道底下四种执行等级就好了: run level 0:关机 run level

2016-07-27 21:36:44 408

转载 linux 正常关机

正确的关机方法OK!大概知道开机的方法,也知道基本的挃令操作,而且还已经知道在线查询了,好累呦! 想去休息呢!那举如何关机呢?我想,径多朊友在 DOS 的年代已经有在玩计算机了! 在当时我们关掉 DOS 的系统时,常常是直接关掉电源开关,而 Windows 在你丌爽的时候,挄着电源开关四秒也可以关机!但是在 Linux 则相当的丌建议这举做!Why?在 Windows (非 N

2016-07-27 21:34:55 2443

原创 混合结构

2016-07-27 15:52:07 331

原创 p2p结构

没有永远在线的服务器任意端系统/节点之间可以直接通讯节点间歇性接入网络节点可能改变IP地址优点:高度可伸缩缺点:难于管理

2016-07-27 15:48:45 483

原创 客户端/服务器结构

服务器 7*24小时提供服务 永久性访问地址/域名 利用大量服务器实现可扩展性客户机 与服务器通信,使用服务器提供的服务 间歇性接入网络 可能使用动态IP地址 不会与其他客户机直接通信

2016-07-27 15:46:03 482

原创 计算机网络的体系结构

2016-07-27 15:41:29 225

原创 网络应用的体系结构

2016-07-27 15:39:40 334

原创 hdu 5752

题意:求能否在5次开根号,回到1(水题)#include#include#include#includeusing namespace std;const int maxn=10009;char s[maxn];int main(){ while(scanf("%s",s)!=EOF) { int len=strlen(s); i

2016-07-26 17:40:29 313

原创 hdu 5666

题意:求x+y=q与坐标轴围成的三角形中,有多少个整数点坐标(不包括边界)解析:注意数据很大,要用到快速乘#include#include#include#includeusing namespace std;typedef long long ll;long long q,p;int t;ll qmul(ll a,ll b,ll m) { ll ans=0;

2016-07-22 11:20:08 229

转载 hdu 题目分类

基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、1061、1070、1076、1089、1090、1091、1092、1093、1094、1095、1096、1097、1098、1106、1108、1157、1163、1164、1170、1194

2016-07-22 08:43:55 645

转载 欧几里德和扩展欧几里德

#include#include#include#includeusing namespace std;const int maxn=1009;//欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。//基本算法:设a=qb+r,其中a,b,q,r都是整数,//则gcd(a,b)=gcd(b,r),即gcd(a,b)=gcd(b,a%b)。//递归int gcd(

2016-07-22 08:40:17 207

原创 hdu 5744

题意:给出字符的个数,组成回文串,找回文串中最小值的最大值。解析:将奇数分成1和2,分别统计1和2的个数,判断下就出来了。#include#include#include#includeusing namespace std;const int maxn=100009;int b[maxn];int a[maxn];int t,n;bool cmp(int a,int b

2016-07-22 08:35:45 391

原创 hdu 5742

题意:求a1+a2/a1+a2+..+an的最大值,其中只给出部分值,ax=y;#include#include#include#includeusing namespace std;const int maxn=109;int t;int n,m;int a[maxn];int gcd(int a,int b){ return b ? gcd(b,a%b):a;

2016-07-22 08:27:49 401

原创 hdu 1019

题意:求M个数 的最小公倍数#include#include#includeusing namespace std;const int maxn=1000009;long long g[maxn];int n;int m;long long gcd(long long a,long long b){ return b ? gcd(b,a%b):a;}int mai

2016-07-21 09:41:42 233

原创 Poj 1840

DescriptionConsider equations having the following form: a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0 The coefficients are given integers from the interval [-50,50]. It is consider a solution a syste

2016-07-19 09:01:33 270

原创 java EE基础知识

开发一个Servlet程序的步骤:                                                        1)创建一个java类,继承HttpServlet类                                                        2)重写HttpServlet类的doGet方法               

2016-07-18 20:07:48 552

原创 hdu 2600

题意:首先给一个大的区间,下面再给一些小区间,求在这些小区间外的最大值。解析:根据小区间,把大区间划分开来,即算得最大值,(事先排个序)#include#include#include#includeusing namespace std;const int maxn=7000009;char s[3123];int as[maxn];struct node{

2016-07-18 19:19:21 333

原创 大数运算

#include#include#include#include#includeusing namespace std;//两个大数相加string sum(string s1,string s2){ if(s1.length()<s2.length()) { string temp=s1; s1=s2; s2=temp; } int i,j; for(i=s

2016-07-18 15:15:21 180

原创 Poj 2002

题意:给一个数N,下面给N行,每行给一个X,Y,表示坐标,求这些坐标能组成正方形最大个数解析:先枚举两个点,通过数学公式得到另外2个点,使得这四个点能够成正方形。然后检查散点集中是否存在计算出来的那两个点,若存在,说明有一个正方形。但这种做法会使同一个正方形按照不同的顺序被枚举了四次,因此最后的结果要除以4.数学公式:(x1,y1)  (x2,y2)则:   x3=x1+(y1

2016-07-16 14:09:21 274

原创 hdu 1423(最长公共上升子序列)

#include#include#include#includeusing namespace std;const int maxn=1009;int a[maxn];int b[maxn];int dp[maxn];int t,n,m;int main(){ scanf("%d",&t); getchar(); while(t--) {

2016-07-16 09:06:36 266

原创 hdu 2710

题意:求一个数的最大素数因子#include#include#include#includeusing namespace std;const int maxn=221009;int a[maxn];int b[maxn];int t,n;int main(){ memset(a,0,sizeof(a)); a[0]=0; a[1]=1; f

2016-07-15 19:40:27 292

原创 hdu 2191

Input输入数据首先包含一个正整数C,表示有C组测试用例,每组测试用例的第一行是两个整数n和m(1Output对于每组测试数据,请输出能够购买大米的最多重量,你可以假设经费买不光所有的大米,并且经费你可以不用完。每个实例的输出占一行。Sample Input18 22 100 44 100 2Sample Output400#inc

2016-07-15 16:33:21 323

原创 hdu 2955

题意:有几组测试用例,第一个小数,表示抢劫犯被抓的概率p,第二个数N表示下面有N个银行,下面N行,每行第一个数表示银行有多少钱,第二个数表示能抓住抢劫犯的概率。求在不被抓住的情况下能抢到最多的钱解析:求反概率,即不被抓住的概率#include#include#include#includeusing namespace std;const int maxn=10009;floa

2016-07-15 11:14:11 192

原创 hdu 1503

题意:给定两个字符串,合并成一个字符串,合并成的这个字符串同时也能分解成原来的两个字符串。解析:使用DP(LCS最长公共子序列),使用标记,不同的状态,用不同的标记,将公共的字符输出一次即可。#include#include#include#includeusing namespace std;const int maxn=1009;int dp[maxn][maxn];in

2016-07-12 17:05:11 343

原创 hiho 1344

题意:给一字符串中,任意单词间没有公共相同的字母,求满足这样的单词的最大个数。解析:贪心+暴力(可以用DFS)#include#include#include#include#includeusing namespace std;const int maxn=1009;string s[maxn];int vis[maxn];int main(){ int n;

2016-07-11 08:03:21 252

原创 最长回文子串

#include#include#includeusing namespace std;const int maxn=1000009;char str[maxn],ste[maxn*2];int p[maxn*2];int main(){ int n; scanf("%d",&n); while(n--) { int i,len

2016-07-09 12:25:34 169

原创 Poj 3450

DescriptionBeside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like trademarks. One of such companies is Inter

2016-07-09 12:15:07 246

原创 Poj 2752

DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the sa

2016-07-08 20:36:05 226

原创 Poj 2406(同1961)

DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponenti

2016-07-08 18:13:16 196

原创 Poj 1961

问题描述For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each

2016-07-08 16:51:33 344

原创 不用加号的数字运算

原理:我们是处于10进制的世界,而计算机则是二进制,下面的方式:主要是运用异或与运算,来计算。#includeint add(int n1, int n2){    if( n2 == 0 )    {        return n1;    }    int numor  = n1 ^ n2;    int overBit = (n1 & n2)

2016-07-08 11:01:05 455

原创 hdu 4099 Revenge of Fibonacci 字典树+斐波拉契数列数列

题意:给你N个数,让你查找是不是前100000个斐波拉契数列的前40位,如果是,那就输出下标最小的那个斐波拉契数列数列的下标。解析:主要是通过trie树来进行,插入和查询,即将前100000个斐波拉契数和下标插入trie树中,然后通过查询输出下标即可(个别细节自己考虑下),现在的关键是如何插入100000个斐波拉契数列(只要前40位),准确的是怎么求这么大的数据(详细见Numinit()函数)

2016-07-08 10:11:44 426

原创 字符串模拟大数相加

#include#include#include#includeusing namespace std;const int maxn=100009;char s1[maxn];char s2[maxn];char temp1[maxn];char temp2[maxn];char sum[maxn+2];int main(){ int t; scanf("%

2016-07-07 21:53:23 268

原创 hdu 1002

求:a+b#include#include#include#includeusing namespace std;const int maxn=100009;char s1[maxn];char s2[maxn];char temp1[maxn];char temp2[maxn];char sum[maxn+2];int main(){ int t; sca

2016-07-07 21:51:54 199

原创 hdu: 4287

Problem Description  We all use cell phone today. And we must be familiar with the intelligent English input method on the cell phone. To be specific, the number buttons may correspond to some Engli

2016-07-07 17:01:10 238 1

原创 Poj 2001 Shortest Prefixes

DescriptionA prefix of a string is a substring starting at the beginning of the given string. The prefixes of "carbon" are: "c", "ca", "car", "carb", "carbo", and "carbon". Note that the empty str

2016-07-07 14:54:55 183

skifree.js

个人游戏写的相关js代码,用于学习JavaScript的面向对象,以及HTML5中的canvas应用。

2018-06-11

CSS第二天笔记

css复习用的资料,主要介绍Css3常用的一些属性: 1.1 边框 2 1.1.1 边框圆角 2 1.1.2 边框阴影 4 1.1.3 边框图片 4 1.1.4案例 用css 实现 8 1.2 渐变 10 1.2.1 线性渐变 (gradient 变化) 10 1.2.2 径向渐变 (radial 径向) 12 1.3 背景 14 1.4 盒模型 17 1.5 过渡(transition) 18

2018-04-23

在线文档API

jQuery API查询文档

2016-11-13

06_exe.html

checkbox的使用

2016-11-10

wnpdf阅读器

简单易用

2016-10-26

springmvc文档

简单容易上手

2016-10-26

ACM并查集讲解的深化和扩展

该资源详细介绍了并查集包含的知识点,并附有例题的分析。

2016-07-01

空空如也

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

TA关注的人

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