- 博客(41)
- 资源 (3)
- 收藏
- 关注
原创 linshiwendang12--匈牙利
#include#define N 10007using namespace std;vector p[N];bool vis[N*2];int mat[N*2];bool find(int x){ for(int i=p[x].size()-1;i>=0;--i){ int y=p[x][i]; if(vis[y]) continue; vis[y]=true; i
2014-08-21 09:36:08 517
原创 spring--注入类型--构造方法(不常用)
3.3.1.1. Constructor InjectionConstructor-based DI is effected by invoking a constructor with a number of arguments, each representing a dependency. Additionally, calling a static factory method
2014-08-16 08:59:53 574
原创 xml给提示
1. FAQ:不给提示:a) window – preferences – myeclipse – xml – xml catalogb) User Specified Entries – add i. Location: D:\share\0900_Spring\soft\spring-framewor
2014-08-16 08:25:22 583
原创 临时文档11--字符串
#include#includeusing namespace std;#includeint main(){ int T; string le,ri,cm; int i,j; cin>>T; for(i=1;i<=T;i++) { int sum=0; cin>>cm; le=ri=""; int len=cm.length(); for(j=0;j<l
2014-08-15 16:37:22 677
原创 10
#include #include #include #include#define eps 1e-8using namespace std;double p[110][110];double sum;int n;void init(){p[2][1]=2.0/3.0;p[2][2]=1.0/3.0;double pj;for(int i=3;i
2014-08-14 17:16:08 597
原创 URAL 1920 Titan Ruins: the Infinite Power of Magic
大意:有一张N*N的网格,你每次可以走一步,每格只能走一次,有没有一种方法让走了L步后回到一个距原点1步远的格子? 没有输出Unsuitable device,否则输出Overwhelming power of magic并输出方案。
2014-08-14 11:43:30 612
原创 hibernate--OneToOne
一对一(one to one)单向关联映射两个对象是一对一的的关系.有两种策略可以实现一对一的关联映射l 主键关联:即让两个对象具有相同的主键值,以表明他们之间的一对一的对应关系;数据库表不会有额外的字段来维护他们之间的关系,仅通过表的主键关系来维护.一对一主键关联映射默认了级联属性,其关联对象会同时存储.所以不会抛出TransientObjectException异常.l
2014-08-12 22:03:04 1301
原创 临时文档9--dfs
#include#include#include#includeusing namespace std;int snum,n,m,sum,flag;int map[35][35];int hum[35][35];char st[500];int c,mmax;int num[30],tt[30];int so[30];int v[30];int judge(){ in
2014-08-12 16:53:57 541
原创 dp--poj1458最长公共子序列
很水的一题但是我居然细节出错了尼玛。。#include#include#includeusing namespace std;int max3(int a,int b,int c){ int d=b>c?b:c; return a>d?a:d;}int max2(int a,int b){ return a>b?a:b;}int dp[1001][1
2014-08-12 10:37:42 576
原创 小技巧--字符串输入从a[1]开始
char a[100],b[100];cin>>a>>(b+1);//cin: abcd abcdcout就是有时候chul
2014-08-12 10:23:17 2770
原创 临时文档8--好恶心的代码
#includeusing namespace std;struct po{int x,y;}p[5];int x[25],y[25];int a[5],b[5];bool thing0(){ int sum=0; for(int i=1;i<=4;i++) { int cx=0,cy=0; for(int j=1;j<=4;j++){ if(i==j)conti
2014-08-11 16:42:28 522
原创 web开发--文档下载
GOOGLE在线文档下载地址分享(GOOGLE的文档地址暂不能用了,会放在其它位置..)GOOGLE的在线文档功能好象挂掉了...等找个其它存放的位置把这些文档再上传上去...存在GOOGLE里面的文档下载链接地址分享记得翻墙= = jbpm3_2_2 Api英文版.chmhttps://docs.google
2014-08-10 22:27:39 588
原创 hibernate---ID生成策略
5.1.4.1. Generator可选的子元素是一个Java类的名字, 用来为该持久化类的实例生成唯一的标识。如果这个生成器实例需要某些配置值或者初始化参数, 用元素来传递。 uid_table next_hi_value_column All generators imple
2014-08-10 12:56:03 632
原创 hibernate学习笔记--可选的配置属性
在文档表 3.3. Hibernate配置属性 属性名用途hibernate.dialect一个Hibernate Dialect类名允许Hibernate针对特定的关系数据库生成优化的SQL.取值 full.classname.of.Dialecthibernate.show_sql输出所有SQL语
2014-08-10 09:18:01 532
原创 小技巧---查doc文档的index.html怎么用的和chm一样
看包里面是否有E:\Java\hibernate3.3.2\hibernate-annotations-3.4.0.GA\hibernate-annotations-3.4.0.GA\doc\reference\zh_cn\html_singleyi
2014-08-10 08:37:05 762
原创 最长公共临时文档7
#include#include#includeusing namespace std;int max2(int a,int b){ return a>b?a:b;}int dp[1001][1001];int main(){string a,b;while(cin>>a>>b){int lena=a.size();int lenb=b.size(); memset(
2014-08-08 19:11:32 442
原创 拓展欧几里得临时文档5
#include #define LL longLL gcd (LL a, LL b) { return b ? gcd (b, a%b) : a; } void Egcd(LL a, LL b, LL &x, LL &y) { if (b == 0) { x = 1; y = 0; return; } LL tp
2014-08-08 11:19:53 506
原创 三分--Football Goal(面积最大)
#include#include#include#include#define eps 1e-9using namespace std;//308.812191double getsum(double c,double a,double b){double p=(a+b+c)/2.0;return c*c/4.0+sqrt(p*(p-a)*(p-b)*(p-c));}d
2014-08-07 19:26:02 701
原创 临时文档4
#includeint main(){ int n,m,p,left,right; int sum; int num[50010]; while(~scanf("%d%d%d%d%d",&n,&m,&p,&left,&right)){ sum=0; int kk=n/m; int th=1; th*=m;sum++; while(1){ if(th==1)br
2014-08-06 17:13:31 629
原创 二分---组合数,上界函数的使用
H - LIGHTOJ 1127Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionGiven n integers and a knapsack of weight W, you have to count the num
2014-08-06 09:46:06 888
原创 Dijkstra--POJ 2502 Subway(求出所有路径再求最短路径)
题意:你从家往学校赶,可以用步行和乘坐地铁这两种方式,步行速度为10km/h,乘坐地铁的速度为40KM/h。输入数据的第一行数据会给你起点和终点的x和y的坐标。然后会给你数目不超过200的双向地铁线路的站点,你可以从一个站点乘坐地铁到下一个站点,你可以在同一线路上乘坐地铁经过不同的站点,在不同线路的站点之间,你只能用步行的方式。让你求利用你可以利用的方式,求解到校花费的最短时间。
2014-08-05 16:15:43 641
原创 二分--LIGHTOJ 1088查找区间(水题)
#include #include #include using namespace std;const int maxN = 100005;int a[maxN];int t, tt;int n, q, x, y;int Bsearch_lower_bound(int x){ int l = 0, r = n - 1, mid = 0; while (l <=
2014-08-05 14:45:56 652
原创 二分--1043 - Triangle Partitioning
1043 - Triangle PartitioningPDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBSee the picture below.You are given AB, AC and B
2014-08-05 10:52:48 646
原创 二分---LIGHTOJ 1062
1062 - Crossed LaddersPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBA narrow street is lined with tall buildings. An x foot long
2014-08-05 10:18:30 610
原创 差分约束----原理其实很简单
一直不知道差分约束是什么类型题目,最近在写最短路问题就顺带看了下,原来就是给出一些形如x-y好神奇的是这类问题竟然可以转换成图论里的最短路径问题,下面开始详细介绍下比如给出三个不等式,b-a由题我们可以得知,这个有向图中,由题b-a根据以上的解法,我们可能会猜到求解过程实际就是求从a到c的最短路径,没错的....简单的说就是从a到c沿着某条路径后把所有权值和
2014-08-04 09:25:54 552
原创 求奇偶子回文串个数
Problem C Count Good SubstringsAccept: 11 Submit: 23Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionWe call a string good, if after merging all the consecutive e
2014-08-04 08:53:49 705
原创 prim
A - Agri-NetTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1258DescriptionFarmer John has been elected mayor of his town
2014-08-02 12:33:36 667
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人