E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
1195
16、线程安全与锁优化
5a6b845c2b753490e073262eb555e768 http://jingyan.baidu.com/article/b2c186c893aa3bc46ff6ff7d.html 葵码:
1195
nickfover
·
2014-10-26 13:00
线程安全
yarn中的wordcount
hadoophdfsyarn伪分布式运行,有如下进程1320DataNode1665ResourceManager 1771NodeManager
1195
NameNode 1487SecondaryNameNode
hao707822882
·
2014-10-20 20:00
yarn中的wordcount
poj
1195
--Mobile phones(二维树状数组)
MobilephonesTimeLimit: 5000MS MemoryLimit: 65536KTotalSubmissions: 15182 Accepted: 7013DescriptionSupposethatthefourthgenerationmobilephonebasestationsintheTampereareaoperateasfollows.Theareaisdivided
u013015642
·
2014-09-23 21:00
poj
1195
二维树状数组 及二维树状数组模板
id=
1195
求矩阵和的时候,下标弄错WA了一次...求矩形(x1,y1)(x2,y2)的sum|sum=sum(x2,y2)-sum(x1-1,y2)-sum(x2,y1-1)+sum(x1-1,y1
u011026968
·
2014-08-13 10:00
POJ
1195
Mobile phones 【二维线段树】
MobilephonesTimeLimit: 5000MS MemoryLimit: 65536KTotalSubmissions: 14291 Accepted: 6644DescriptionSupposethatthefourthgenerationmobilephonebasestationsintheTampereareaoperateasfollows.Theareaisdivided
u012846486
·
2014-07-15 00:00
POJ1195
POJ
1195
Mobile phones 【二维树状数组】
MobilephonesTimeLimit: 5000MS MemoryLimit: 65536KTotalSubmissions: 14288 Accepted: 6642DescriptionSupposethatthefourthgenerationmobilephonebasestationsintheTampereareaoperateasfollows.Theareaisdivided
u012846486
·
2014-07-13 14:00
POJ1195
hdu
1195
Open the Lock 暴力穷举
OpentheLockTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):3972 AcceptedSubmission(s):1728ProblemDescriptionNowanemergenttaskforyouistoopenapasswordloc
u013532224
·
2014-07-10 15:00
C++
逆序数
暴力
POJ_
1195
Mobile phones 【二维树状数组】
id=
1195
纯纯的二维树状数组,不解释,只需要注意一点,由于题目中的数组从0开始计算,所以维护的时候需要加1。
u013912596
·
2014-06-23 22:00
数据结构
C++
ACM
poj
HDU
1195
Open the Lock (双向广搜)
题意:给你初始4个数字和目标4个数字,问是否能由初始经过变换到目标数字;变换规则:每个数字可以加1(9+1=1)或减1(1-1=9),或交换相邻的数字(最左和最右不是相邻的)。双向广搜:分别对初始和目标数字进行广搜,vis数组用1和2标记两种已搜索的数字,用mp数组记录状态的步数。当从前往后搜可以到达2或从后往前搜可以到达1状态则就可以了。。。#include #include #include
u012861385
·
2014-06-20 21:00
JavaScript页面跳转的一些实现方法
来自:http://www.nowamagic.net/librarys/veda/detail/
1195
第一种 window.location.href=”login.jsp?
cheongkinpui
·
2014-06-17 12:18
js跳转
HDU
1195
Open the Lock (双向BFS与单向BFS)
刚学了个双向BFS,顺便用这题来练习练习,看看效果如何。先来个单向bfs。用时62ms。下面是单向BFS代码。这次写的很顺利,基本一次性写完没有调试提交就AC了。。#include #include #include #include usingnamespacestd; intvis[100000],a[5],b[5]; chars1[5],s2[5]; intjj[]={1,-1}; stru
u013013910
·
2014-04-30 16:00
编程
算法
C语言
bfs
ACM-BFS之Open the Lock——hdu
1195
(双向BFS)
这道题的初级版本,暴力BFS及题目详情请戳:http://blog.csdn.net/lttree/article/details/24658031上回书说道,要用双向BFS来尝试一下。终于AC了,双向BFS,就是从两个点寻找一个共同的中间点。然后把各自到这个中间点的步数加起来,及为最短步数。肯定有人问了,双向BFS有啥好处捏?鄙人,有图有真相!单BFS:双向BFS:发现了不?尤其是随着搜索广度的
lx417147512
·
2014-04-29 09:00
Lock
ACM
open
bfs
the
hdu1195
双向BFS
ACM-BFS之Open the Lock——hdu
1195
OpentheLockTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):3825 AcceptedSubmission(s):1650ProblemDescriptionNowanemergenttaskforyouistoopenapasswordloc
lx417147512
·
2014-04-28 17:00
Lock
ACM
open
bfs
the
hdu1195
暴力广度优先搜索
POJ
1195
Mobile phones (二维树状数组)
id=
1195
DescriptionSupposethatthefourthgenerationmobilephonebasestationsintheTampereareaoperateasfollows.Theareaisdividedintosquares.ThesquaresformanS
u012823258
·
2014-04-09 14:00
二维树状数组
让spring启动时应用不需要加载数据库【default-lazy-init="true"】
2010-10-2211:22提问者悬赏:15分|zxqwh|分类:其他编程语言|浏览
1195
次也就是说应用启动时不连接数据库,其它不使用数据库的应用也能启动,当用到数据库操作的应用需要操作数据库时,在加载数据库
woodpeckerboy
·
2014-03-28 14:00
spring
HDU
1195
:Open the Lock(BFS)
ProblemDescriptionNowanemergenttaskforyouistoopenapasswordlock.Thepasswordisconsistedoffourdigits.Eachdigitisnumberedfrom1to9. Eachtime,youcanaddorminus1toanydigit.Whenadd1to'9',thedigitwillchangetobe
libin56842
·
2014-03-27 10:00
HDU
bfs
poj
1195
二维树状数组应用实例
id=
1195
DescriptionSupposethatthefourthgenerationmobilephonebasestationsintheTampereareaoperateasfollows.Theareaisdividedintosquares.ThesquaresformanS
u013573047
·
2014-03-21 20:00
POJ
1195
Mobile phones(简单二维树状数组)
POJ
1195
Mobilephones(简单二维树状数组)分析:二维树状数组基本应用。题中的二维数组是从0到S-1,我们读入数据的时候自动把格子坐标加上1,使得二维数组下标从1到S。
u013480600
·
2014-03-20 12:00
ACM
ip包头结构详解
空间管理您的位置: 51Testing软件测试网 » seventest » 日志IP包头结构详解上一篇 / 下一篇 2010-07-0709:27:06/个人分类:网络查看(
1195
) / 评论(0
wenwuge_topsec
·
2014-03-19 15:00
linux
网络
ip包格式
POJ
1195
Mobile phones
树状数组第一题,上来就是二维树状数组,这是逼着我用树状数组做啊,二维线段树不会写啊~~题目大意:给定矩阵大小,可以更新矩阵中的某些数,要求输出某个范围内的所有数之和。解题思路:二维树状数组可解。一维树状数组讲解:点击打开。二维树状数组只是在更新方式上稍作改变。在数组长度为n的树状数组中:寻找下一个需要添加的数的下标:intlowbit(intx) { returnx&(-x); }一维树状数组更新
lin375691011
·
2014-03-14 19:00
poj
树状数组
刷题
poj
1195
之二维树状数组
MobilephonesTimeLimit: 5000MS MemoryLimit: 65536KTotalSubmissions: 13798 Accepted: 6408DescriptionSupposethatthefourthgenerationmobilephonebasestationsintheTampereareaoperateasfollows.Theareaisdivided
xingyeyongheng
·
2014-03-09 19:00
题目
1195
:最长&最短文本
题目描述: 输入多行字符串,请按照原文本中的顺序输出其中最短和最长的字符串,如果最短和最长的字符串不止一个,请全部输出。输入:输入包括多行字符串,字符串的长度len,(1al=newArrayList(); intmax=Integer.MIN_VALUE,min=Integer.MAX_VALUE; while((s=cin.readLine())!=null){ intlen=s.leng
wuli2496
·
2014-03-03 21:00
poj
1195
Mobile phones(二维的树状数组)得好好看。。。
1、http://poj.org/problem?id=11952、题目大意给定4种操作,分别是操作0的意思是创建一个S*S的空矩阵操作1的意思是将矩阵中的(X,Y)位值的数字加上A操作2的意思是求出左上角坐标是(L,B),右下角坐标是(R,T),求这一个矩形内的所有点的值的和操作3是样例结束符3、题目分析乍一看题目好像挺简单的,不就是操作一个矩阵嘛,从头遍历查询求和就行,问题就在这,矩阵很大,查
sdjzping
·
2014-02-26 16:00
poj
1195
Mobile phones(二维树状数组基础)
id=
1195
题意:有一个s*s的方格,有两种操作,给某个方格a[x][y]加上一个数add和询问某一个子矩阵内所有数字的和。思路:二维树状数组的模板。。
u013081425
·
2014-02-13 10:00
树状数组
POJ
1195
二维树状数组,比较简单#include #include #include usingnamespacestd; constintllen=1124; inttree[llen][llen]; intlen; voidinit(){ for(inti=0;i0;i-=lowbit(i)){ for(intj=y;j>0;j-=lowbit(j)){ sum+=tree[i][j]; } }
X_White
·
2013-12-21 10:00
POJ
1195
Mobile Phone 最基础的二维线段树
题意:对一个矩阵不停的更新和查询,每次查询得到一个子矩阵的和。最基础的二维线段树。感觉还不是很难,和最开始自己猜测的样子差不多——在一维的基础上,对每一个节点加上一棵子树,还是很形象的。第一维还是表示X轴,然后每一个节点的子树表示在这一段区间内Y轴上的情况。写完之后感觉自己以前的一维线段树有很多不足,冗杂的没有任何意义的计算不仅浪费了时间也浪费了大量的内存,是时候好好整理一下了。PS:要是走之前就
u012161037
·
2013-12-18 19:00
Qt5 在win7上发布 & 打包依赖dll生成exe方法
Qt5在win7上发布&打包依赖dll生成exe方法分类: Qt 软件2013-06-1820:51
1195
人阅读 评论(0) 收藏 举报发布Windows7Qt5软件目录(?)
oMingZi12345678
·
2013-12-04 13:00
软件
qt
HDU
1195
Open the Lock
题目链接~~>做题感悟: 第一次做这题时用的是单向广搜,用的最笨的方法,把所有情况都列出来了。这一星期搞了一下双向广搜,百度了一下这题可以用双向广搜,正好借这题学一下双向广搜,学完才发现原来双向广搜广搜这么简单。题意: 给你两个四位数的整数,让你从第一个经过若干次变化变成第二个。可以进行的操作:某一位减一(如果是1,则变成9),某一位加一(如果是9,则变成1),
u011074149
·
2013-11-28 21:00
POJ
1195
Mobile phones(二维树状数组)
id=
1195
类型:二维数组的单点修改,区间查询 题目大意:有一个S*S的矩阵,有以下操作: 0 S 表示初始化一个S*S的矩阵,矩阵中每个元素被初始化为0 1 XYA
fjy4328286
·
2013-11-06 16:00
树状数组
UVa 10254 The Priest Mathematician (组合数学&规律发现&高精度)
option=com_onlinejudge&Itemid=8&category=34&page=show_problem&problem=
1195
Theancientfolklorebehindthe
synapse7
·
2013-10-20 12:00
java
C++
ACM
uva
hdu
1195
Open the Lock (bfs)
题意:给定两个四位数,一个代表密码的初始状态,一个代表密码的开锁状态。对于四位数中的任意一位,可以将其减一或者加一,数字只是1到9,没有0,如果是1,要减一的话,就变成了9,相反,9要加一的话,就变成了1.还可以将两个相邻的位交换,但是最左的位不能和最右的位交换,最右和最左亦然。每改变一次算一步操作。问给定这两种状态,从初始状态到开锁状态最少需要多少步操作? 题解:bfs求解所有状态,最先到达的点
ljd4305
·
2013-10-09 10:00
POJ
1195
- Mobile phones 二维树状数组(单点更新..区间查询)
题意: 给了一个N*N的矩阵(N #include #include #include #include #include #include #include #include #include #definelllonglong #defineoo1000000009 #defineMAXN1030 #definepiacos(-1.0) #defineesp1e-
kk303
·
2013-10-05 17:00
poj
1195
- Mobile phones(树状数组)
二维的树状数组,,,记得矩阵的求和运算要想好在写。。。。代码如下:#include #include #include #include #include #include #include #include #include #include #include #defineM1100 #defineINF0x7fffffff #defineeps1e-8 #defineLLlonglong
shankeliupo
·
2013-09-02 12:00
暑期训练个人小结 byPlato
翻了下成绩:1:3题,1932:2题,1753:3题,614:4题,
1195
:4题,746:1题,1897:3题,698:2题,1239:2题,14210:4题,94杭州邀请
XDU_Truth
·
2013-08-26 01:00
继续二维树状数组 pku
1195
设想一个矩形,左上角坐标为(x1,y1),右下角坐标为(x2,y2),现在我们对其利用二维树状数组进行区间求和 sum(x2,y2)表示0,0--》x2,y2大矩形求和,sum(x1-1,y2)表示0,0->x1-1,y2求和 sum(x2,y1-1)、sum(x1-1,y1-1)同理, sum(x2,y2)-sum(x1-1,y2)-sum(x2,y1-1)+sum(x1-1,y1-1)即
haha593572013
·
2013-08-19 18:00
poj
1195
Mobile phones
点击打开链接poj
1195
思路:二维树状数组分析:1给定一个矩阵和三种操作1abx表示把[a,b]值加上x,2LBRT表示L #include #include #include usingnamespacestd
cgl1079743846
·
2013-08-12 21:00
poj
1195
(树状数组)
点击打开链接题意:给你一个n*n的矩阵进行操作,1x,y,a,-将右下角的矩阵+a;2x,y,xx,yy求(x,y)和(xx,yy)构成的矩阵的和。。。将sum和add都换为而二维的就行了。。#include"stdio.h" #include"string.h" #include"algorithm" usingnamespacestd; #defineN1025 intA[N][N]; int
yyf573462811
·
2013-08-12 16:00
hdu
1195
Open the Lock (DFS)
ProblemDescriptionNowanemergenttaskforyouistoopenapasswordlock.Thepasswordisconsistedoffourdigits.Eachdigitisnumberedfrom1to9.Eachtime,youcanaddorminus1toanydigit.Whenadd1to'9',thedigitwillchangetobe'
·
2013-08-04 20:00
Lock
hdu
1195
Open the Lock(BFS)
pid=
1195
BFS三个方向:加1,减1,相邻交换,其中9+1=1,1-1=9,最左边不与最右边相邻code:#include #include #include #include #include
yew1eb
·
2013-07-21 14:00
HDU
1195
Open the Lock
OpentheLockTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):2919 AcceptedSubmission(s):1276ProblemDes
lsh670660992
·
2013-07-21 10:00
poj
1195
(二维树状数组)
MobilephonesTimeLimit:5000MS MemoryLimit:65536KTotalSubmissions:12554 Accepted:5787DescriptionSupposethatthefourthgenerationmobilephonebasestationsintheTampereareaoperateasfollows.Theareaisdividedinto
xj2419174554
·
2013-07-16 18:00
数据结构
二维树状数组
hdu
1195
Open the Lock 单项bfs(31ms) 双向bfs(0ms)
OpentheLockTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):2802 AcceptedSubmission(s):1224ProblemDescriptionNowanemergenttaskforyouistoopenapasswordloc
u010228612
·
2013-07-12 20:00
hdu
1195
Open the Lock(双向bfs+循环队列)
->题目请戳这里 #include #include usingnamespacestd; chars1[5],s2[5]; boolmark[10][10][10][10]; structnode{ chars[5]; intcount; }t,now,last; voidBfs() { queueq; memset(mark,0,sizeof(mark)); strcpy(t.s,s1)
ophunter
·
2013-07-05 15:00
bfs
hdu
1195
双向广搜
pid=
1195
代码比较长,但都是重复代码!!!#include #include #include #defineINF0x3f3f3f3f #defineBUGprintf("here!
JustSteps
·
2013-07-04 14:00
hdu
1195
-Open the Lock
pid=
1195
dfs暴力搜索#include #include #include #include #include usingnamespacestd; structnode { intnum[4
liujie619406439
·
2013-06-14 18:00
搜索
bfs
HDU
1195
(BFS)
OpentheLockTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):2677 AcceptedSubmission(s):1178ProblemDescriptionNowanemergenttaskforyouistoopenapasswordloc
xj2419174554
·
2013-06-01 20:00
图论
bfs
性能测试工程师的素质要求
boardid=16&id=
1195
&page=0&move=pre作为一名性能测试工程师,要求懂:一些服务器技术、一些操作系统知识、一些数据库知识、一些中间件知识、一些编程能力、一些网络基础、一些沟通技巧
mr_szj
·
2013-05-10 11:28
性能测试
素质
hdu
1195
Open the Lock BFS 广搜
题目链接:here题意:给你四个数字,每次可以将其中任何一个数字+1或者-1;1的时候-1等于9 ;9的时候+1等于1; 问最少需要变换几次,才可以变到目标序列。。分析:我先用广搜做了一遍,随后又用双向广搜做了一遍,发现双向广搜效率的确很高!贴一下图:第一个是双向广搜的,下面的是广搜。。。晒代码:广搜:#include #include #include #include usingnamespa
liuqiyao_01
·
2013-05-06 20:00
ACM
bfs
广搜
hdu1195
双向广搜
交换地方HDU
1195
Open the Lock 简单搜索-bfs
pid=
1195
一个标准的宽搜,一点不须要剪枝 须要意注的一点是:交换的时候,这个地方只能交换街坊,我时当看错为以可以意任交换 代码如下: 每日一道理人生是洁白的画纸
·
2013-04-30 17:00
Lock
id=
1195
二维树状数组
题意:给你一个n*n的矩阵,然后对其进行操作①一种操作:给(x,y,A)在坐标(x,y)上增加A,然后对子矩阵进行更新。②另一种操作:查找子矩阵(x1,y1,x2,y2)对其求值。思路:利用二维树状数组,对子矩阵进行更新和查找#include #include #include #include #definemaxn1111 usingnamespacestd; intmap[maxn][max
wahaha1_
·
2013-04-17 13:00
上一页
4
5
6
7
8
9
10
11
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他