自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

-- bird --

像蜗牛一样慢慢前行,总会有到达终点的一天 TT

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

原创 表格嵌套的边框处理

网页表格表框制作技巧。           表格边框的显示与隐藏,是可以用frame参数来控制的。请注意它只控制表格的边框图,而不影晌单元格。      只显示上边框       只显示下边框        只显示左、右边框       只显示上、下边框       只显示左边框       只显示右边框   

2013-10-25 14:40:36 2644

转载 Jquery中dialog属性小记

$('#dialogDiv').dialog( { hide:true, //点击关闭是隐藏,如果不加这项,关闭弹窗后再点就会出错. autoOpen:false, height:380, width:800, modal:true, //蒙层(弹出会影响页面大小) title:'开标人', overlay: {opacity: 0.5, background: "black" ,

2013-10-15 10:45:15 14085 1

转载 一个简单的Spring的AOP的例子

经过这段日子的学习和使用Spring,慢慢地体会到Spring的优妙之处,正在深入地吸收Spring的精华,呵呵。现在写的这个只是个简单AOP例子,包括前置通知,后置通知,环绕通知,和目标对象。写这个例子的主要目标只是想让想学AOP的能更快地入门,了解一下如何去配置AOP里面的东东。目标对象的接口:IStudent.java 1  /**  2  *  3   */  4

2013-09-13 10:13:18 862

转载 HQL函数汇总

Criteria查询对查询条件进行了面向对象封装,符合编程人员的思维方式,不过HQL(Hibernate Query Language)查询提供了更加丰富的和灵活的查询特性,因此Hibernate将HQL查询方式立为官方推荐的标准查询方式,HQL查询在涵盖Criteria查询的所有功能的前提下,提供了类似标准SQL语句的查询方式,同时也提供了更加面向对象的封装。以下就是HQL的一些常用函数,有了这

2013-08-28 14:39:52 1434

转载 jsp过滤器解决乱码

(1)前言:解决web程序的国际化问题,必须在任何地方使用UTF-8对字符进行编码。(包括:数据库设置为:UTF-8,web页面也要设置为:UTF-8)这样做的好处在于可以解决在web上不止中文字符编码问题,所有的字符编码都统一使用UTF-8,实现了语言的国际化。同时在保

2011-09-22 11:53:00 3885

原创 JS弹窗和对话框大全

//-----------按钮提示框----------// //-----------按钮提示框----------// //-----------提交按钮----------// //-----------关闭按钮----------// /

2011-09-21 14:09:41 13359 2

转载 JS控制弹出窗口

一、 基本变化 window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=

2011-09-21 12:44:38 3073

转载 java分割字符串和正则表达式

java分割字符串和正则表达式分离字符串 将字符串依所设定的条件予以分离是很常见的操作,例如指令的分离、文本文件的数据读出等。以后者而言,当在文本文件中存储以下的数据时,在读入文件后,将可以使用String的split()来协助每一行的数据分离。 justin 64/5/26 0939002302 5433343 momor 68/7/23 0939100391 5432343 范例6.8

2011-06-25 21:08:00 7092

原创 网络最大流(SAP)【模板】

<br />#include <stdio.h>#include <string.h>const int inf=1<<30;#define MAXM 2000 struct edge{ int from, to, val, next;}e[MAXM*MAXM];int v[MAXM];int n,m,len,st,ed; //st = 源点 ed = 汇点void init(){ len = 0; memset(v,-1,sizeo

2010-08-25 16:59:00 977

原创 PKU 2289(网络最大流(SAP) + 二分枚举)

Jamie's Contact GroupsTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 2847 Accepted: 912<br />DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The contact list

2010-08-25 16:50:00 706

原创 PKU 3216(最小路径覆盖 + floyd)

Repairing CompanyTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 3986 Accepted: 1033<br />Description<br />Lily runs a repairing company that services the Q blocks in the city. One day the company receives M repair tasks, the ith of which occurs

2010-08-25 11:34:00 682

原创 HDU 1350(最小路径覆盖)

Taxi Cab Scheme<br />Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 87    Accepted Submission(s): 46<br /><br />Problem DescriptionRunning a taxi station is not all that simple. Apart from th

2010-08-24 17:15:00 945

原创 ZOJ 1525(最小路径覆盖)

Air RaidTime Limit: 1 Second      Memory Limit: 32768 KB Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's streets you

2010-08-24 16:02:00 815

原创 PKU 2446(最大二分图匹配)

http://acm.pku.edu.cn/JudgeOnline/problem?id=2446#include <iostream>#include <vector>using namespace std;#define MAX 1050vector< vector<int> > map; int mark[MAX];bool flag[MAX];int nm,num;int dis[4][2] = {{0,1},{1,0},{-1,0},{0,-1}};bo

2010-08-23 11:15:00 570

原创 HDU 1506(DP)

Largest Rectangle in a Histogram<br />Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 1982    Accepted Submission(s): 645<br />Problem DescriptionA histogram is a polygon composed of a sequence

2010-08-22 23:23:00 883

原创 HDU 2955(0-1背包问题)

Robberies<br />Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 1261    Accepted Submission(s): 453<br /><br />Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, an

2010-08-22 21:52:00 3127 1

原创 HDU 1087(DP)

Super Jumping! Jumping! Jumping!<br />Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 7196    Accepted Submission(s): 2867<br /><br />Problem DescriptionNowadays, a kind of chess game called “Su

2010-08-22 11:12:00 918

原创 HDU 3549(网络流)

Flow Problem<br />Time Limit: 5000/5000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)<br />Total Submission(s): 123    Accepted Submission(s): 78<br /><br />Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given

2010-08-19 11:48:00 916

原创 网络最大流(dinic)【模板】

#include using namespace std;const int maxn=150000;const int maxm=2000000;const int inf=1

2010-08-19 10:25:00 1197 1

原创 HDU 3546(高精度,java写)

Calculator<br />Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)<br />Total Submission(s): 173    Accepted Submission(s): 65<br /><br />Problem DescriptionGolden Adobe is the most advanced computer for scientific computin

2010-08-19 09:20:00 747

原创 HDU 2454(2008哈尔滨现场赛)

Degree Sequence of Graph G<br />Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 651    Accepted Submission(s): 243<br /><br />Problem DescriptionWang Haiyang is a strong and optimistic Chinese y

2010-08-18 09:58:00 946

原创 HDU 2451(2008哈尔滨现场赛)

 Simple Addition ExpressionTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 569    Accepted Submission(s): 189Problem DescriptionA luxury yacht with 100 passengers on board is sailing on the sea in the

2010-08-18 09:48:00 1232 2

原创 PKU 2406(KMP算法的灵活应用)

Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 13798 Accepted: 5754<br />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 conca

2010-08-15 21:17:00 1005

原创 ural 1297(求最长回文子串,后缀数组)

1297. PalindromeTime Limit: 1.0 secondMemory Limit: 16 MBThe “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Unlimited» has infiltrated into “U.S. Robotics”. «U.S. Robots» security

2010-08-15 20:04:00 2876 3

原创 PKU 3261(求最长的至少出现k次的子串,后缀数组+二分枚举)

Milk PatternsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 3806 Accepted: 1569Case Time Limit: 2000MS<br />Description<br />Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he

2010-08-15 09:49:00 933

原创 PKU 1743(求最长重复但不重叠子串,后缀数组 + 二分枚举答案)

Musical ThemeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 5545 Accepted: 1936<br />DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It

2010-08-15 08:50:00 1217

原创 最长重复子串(后缀数组)

http://ds.bianchengla.com/course/3/practise/problem?id=1387最长重复子串时间限制:1000 ms  |  内存限制:3000 KB 描述 <br />对于一个字符串S1,其中S2是他的一个子串(长度严格小于S1长度),如果S2在S1中出现次数超过1次,那么S2就是一个重复子串,现在的要求是给定S1,请求出他的最长重复子串;<br /> <br />如果有多个长度一样的最长子串,请输入字典序最小那个串;<br /> <br />比如bbbaaaccc<

2010-08-13 19:40:00 1141

原创 SPOJ 705(后缀数组求单个子串的不重复子串个数)

SPOJ Problem Set (classical)705. New Distinct SubstringsProblem code: SUBST1<br /> <br />Given a string, we need to find the total number of its distinct substrings. Input<br />T- number of test cases. T<=20; Each test case consists of one string, whose le

2010-08-13 17:21:00 1068

原创 PKU 2250(变形的LCS)

CompromiseTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2991 Accepted: 1407 Special Judge<br />DescriptionIn a few months the European Currency Union will become a reality. However, to join the club, the Maastricht criteria must be fulfilled, a

2010-08-13 16:31:00 624

原创 HDU 3525(树状数组求解LCS)

Orienteering<br />Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 203    Accepted Submission(s): 64<br /><br />Problem DescriptionThe Orienteering competition is coming soon!Now there are N play

2010-08-13 11:03:00 1040

原创 树状数组【模板】

<br />int lowbit(int t){ return t&(-t);}void change(int pos , int num,int n) //修改{ while (pos<=n) { tree[pos] += num; pos += lowbit(pos); }}int ask(int end)//查询{ int sum = 0; while(end >

2010-08-13 10:17:00 407

原创 最长公共子序列【线段树版的LCS】

<br />#include<iostream>#include<cstring>#include<algorithm>#include<vector>#define N 200008#define Musing namespace std;int hash1[N], hash2[N], x[N], y[N], dp[N], next1[N], next2[N];vector <int> v[N];struct LTree{ int a, b,

2010-08-13 09:15:00 668

原创 树状数组

树状数组(Binary Indexed Tree)是又一种静态的树结构。它的首要用途是用于维护前缀和,也即:一数组a[1..n],随时会改变其中某a[i],还会询问s[i]=a[1]+a[2]+…+a[i],树状数组可完美解决这一问题。定义数组c[0..n],其中c[i]=a[i-2^k+1]+a[i-a^k+2]+…+a[i],其中k为i在二进制下末尾0的个数。当我们改变一个a[i]时,会有很多c[i]随之改变;若需查询某个s[i],需要累加多个c[i]。好在确定需要改变或累加的元素都可以用比较简便的方法

2010-08-13 09:02:00 432

原创 SPOJ 694(后缀数组)

694. Distinct SubstringsProblem code: DISUBSTR<br /> <br />Given a string, we need to find the total number of its distinct substrings.Input<br />T- number of test cases. T<=20;<br />Each test case consists of one string, whose length is <= 1000Output<br /

2010-08-12 21:56:00 731

原创 PKU 2774(后缀数组求最长公共子串)

Long Long MessageTime Limit: 4000MS Memory Limit: 131072KTotal Submissions: 9500 Accepted: 3816Case Time Limit: 1000MS<br />DescriptionThe little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mothe

2010-08-12 21:26:00 810

原创 后缀数组【模板】

【倍增法模板】:/*************************************/maxn 是两个字符串之和连接后的长度/*************************************/int wa[maxn],wb[maxn],wv[maxn],ws[maxn];int cmp(int *r,int a,int b,int l){return r[a]==r[b]&&r[a+l]==r[b+l];}void da(int *r,int *sa,int

2010-08-12 17:52:00 1118

原创 最长公共子序列【模板】

<br />/********************************** 最长公共子序列(LCS)只能处理一些较短的字符串的DP算法 **********************************/#define N 10001 /*字符串长度*/int longest[N][N];int LCS(char *s1,char *s2){ int i,j,len1,len2; len1 = strlen(s1); len2 = s

2010-08-12 10:05:00 909

原创 字典树【模板】

/*******************************************************************************此模板主要是针对都是小写字母的。其他情况在此基础上改一改就可以了,要懂得灵活运用。 ********************************************************************************/struct trie /*字典树的节点内容*/{ int coun

2010-08-11 19:43:00 2075 3

原创 HDU 1761(模拟题,字典树)

<br />Spring-outing Decision(2)<br />Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 164    Accepted Submission(s): 39<br /><br />Problem Description历经千辛万苦,ACgirl 终于定好了时间,在那一天,她们班全班的人都有时间去春游。<br

2010-08-11 17:24:00 918

原创 HDU 2204 (数论)

Eddy's爱好<br />Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 187    Accepted Submission(s): 100<br /><br />Problem DescriptionIgnatius 喜欢收集蝴蝶标本和邮票,但是Eddy的爱好很特别,他对数字比较感兴趣,他曾经一度沉迷于素数,而现在他对于一些新的特殊

2010-08-11 11:04:00 2362 3

空空如也

空空如也

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

TA关注的人

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