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
University
2015 Multi-
University
Training Contest 6 Solutions
先放上官方答案,完整版请戳: http://bestcoder.hdu.edu.cn/blog/-------------------------大家好我是分割线----------------------1011.KeySetSummaryForagivenset{1,2,..., nn},youaretofindthenumberofnonemptysubsetswithevensum.Sol
不高不富不帅的陈政_
·
2015-08-06 19:00
hdoj
多校联合训练
BestCoder
hdu 5353 Average(2015 Multi-
University
Training Contest 6)
Average TimeLimit:4000/2000MS(Java/Others) MemoryLimit:131072/131072K(Java/Others) TotalSubmission(s):174
caduca
·
2015-08-06 18:00
Algorithm
编程
ACM
HDU
多校
2015 Multi-
University
Training Contest 5(HDOJ5351)
官方题解:http://blog.sina.com.cn/duoxiao2015感觉整理太水的题完全没用,从这次之后就不整理水题了,水题定义:比赛时超过300人AC的题目HDOJ5344、5347、5349均为600+人做出来的水题,解法见官方题解HDOJ5351题意:定义一个fib字符串fib[1]=bfib[2]=afib[i]=fib[i-1]fib[i-2],i>2fib[n]的前m个字符
bnmjmz
·
2015-08-06 11:00
hdoj 题目分类
10031、2、3、4、5...简单题 1004渊子赛马排序+贪心的方法归并 1005HeroInMaze广度搜索 1006Redraiment猜想数论:容斥定理 1007童年生活二三事递推题 1008
University
JamesLi6
·
2015-08-04 21:00
2015 Multi-
University
Training Contest 5
比赛链接:clickhere~~hdu5344 MZL'sxor【题意】:ProblemDescriptionMZLlovesxorverymuch.NowhegetsanarrayA.ThelengthofAisn.Hewantstoknowthexorofall(Ai+Aj)(1≤i,j≤n)ThexorofanarrayBisdefinedas B1 xor B2...xor Bn Inpu
u013050857
·
2015-08-04 18:00
2015 Multi-
University
Training Contest 5
#include//1002 #include #include usingnamespacestd; constintmaxn=500000+10; typedeflonglongll; inta[maxn]; intmain() { intn,z,l; llm; intt; scanf("%d",&t); while(t--) { scanf("%d%lld%d%d",&n,&m,&z,&l)
k183000860
·
2015-08-04 14:00
2015
Multi-Universit
2015 Multi-
University
Training Contest 4(HDOJ5327、5328、5335、5536)
官方题解:http://blog.sina.com.cn/duoxiao2015队友回家了。。于是开启单刷模式。。。但是中间吃饭+被叫去开会,于是比赛时就AC了3题,排167名,开完会回来继续把第4题写完,结果刚好比赛结束,于是就变成赛后ACHDOJ5327题意:问[l,r]中有几个数是各个位的数字均不相同思路:水题,先预处理下就好#include #include #include #inclu
bnmjmz
·
2015-08-01 15:00
2015 Multi-
University
Training Contest 3(HDOJ5316、5317、5319、5326)
官方题解:http://blog.sina.com.cn/duoxiao2015这是放暑假后的第一场,上场在赶课设的deadline,就没去,然后队友爆零了(貌似他们晚上有考试,就只写了几小时的样子)这场做第二题时脑抽,被卡烦了,就把写一半的代码扔给队友继续写HDOJ5316题意:n个数字,m个操作操作0ab,在[a,b]区间选出一个子序列,该子序列的所有相邻元素原位置奇偶不同,输出满足条件的子序
bnmjmz
·
2015-08-01 12:00
2015 Multi-
University
Training Contest 2
多校第二场,赛后总共做出四题,总结的有点晚了,太懒,下面给出解题报告!!Hdu5301Buildings题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5301题意:有块地为n*m列的矩阵,要建造矩形公寓来完全覆盖这块地((x,y)方格除外)且每个公寓必须有一边在这块地的矩阵的边缘上。求满足条件的方案中公寓最大面积的最小值。思路:相当于用矩形填充n*m
PJQOOO
·
2015-08-01 10:00
2015 Multi-
University
Training Contest 1(HDOJ5288、5289)
官方题解:http://blog.sina.com.cn/duoxiao2015第一场开始时都还没放暑假。。。队友用我感觉会超时的代码AC了两题,囧。。。HDOJ5288题意:给一个序列,求共有多少个找不到任意两个不同数是整除关系的连续子序列,结果mod1e9+7思路:见官方题解O(nsqrt(n))的算法,但是没看懂,然后下图是大牛给我的解说,看完就懂了PS:O(n^2)肯定会超时,但是数据太水
bnmjmz
·
2015-07-31 19:00
2015 Multi-
University
Training Contest 4 Walk Out
WalkOutTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):3210 AcceptedSubmission(s):647ProblemDescriptionInann∗mmaze,theright-bottomcorneristheexit(posit
basasuya
·
2015-07-31 11:00
bfs
多校
2015 Multi-
University
Training Contest 4 Walk Out
WalkOutTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):3210AcceptedSubmission(s):647ProblemDescriptionInann∗mmaze,theright-bottomcorneristheexit(position(n,m)
basasuya
·
2015-07-31 11:00
HDU 5336 XYZ and Drops(BFS 水滴爆破)2015 Multi-
University
Training Contest 4
XYZandDropsTimeLimit:3000/1500MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):603 AcceptedSubmission(s):163ProblemDescriptionXYZisplayinganinterestinggamecalled"drops".It
u010372095
·
2015-07-31 10:00
算法
搜索
bfs
2015 Multi-
University
Training Contest 4
1001、Olympiad题目传送:HDU-5327-Olympiad维护前缀和即可AC代码:#include #include #include #include #include #include #include #include #include #include #include #include #include #include #defineLLlonglong #defineIN
u014355480
·
2015-07-30 23:00
ACM
HDU
多校
HDU 5335 Walk Out(BFS+BFS) 经典 2015 Multi-
University
Training Contest 4
WalkOutTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):506 AcceptedSubmission(s):84ProblemDescriptionInann∗mmaze,theright-bottomcorneristheexit(positio
u010372095
·
2015-07-30 21:00
算法
搜索
bfs
2015 Multi-
University
Training Contest 4
【比赛链接】:clickhere~~hdu5328:ProblemKiller【题意】:给一个数列,求最长的连续元素等差或等比数列的长度【思路】:首先如果a,b,c是等差数列,且b,c,d是等比数列,那么a,b,c,d也是等差数列,对于等比数列,这个性质同样成立,所以只要对于每个i(1 #include #include #include #include #include #include #i
u013050857
·
2015-07-30 21:00
多校训练
hdu 5335 Walk Out (2015 Multi-
University
Training Contest 4)
WalkOut TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others) TotalSubmission(s):194 Accepted
caduca
·
2015-07-30 18:00
Algorithm
算法
ACM
HDU
多校
2015 Multi-
University
Training Contest 1
最近真是太废柴了,题没做几道,也没学什么新知识,多校做了三场也没总结~诶!好好学吧!多校第一场感觉被完虐...orz...Hdu5288OO’sSequence题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5288题意:f(l,r)表示满足ai%aj≠0的i的个数(i∈[l,r],j∈[l,r],j≠i)已知n个数a1,a2,…an,求思路:这个题实
PJQOOO
·
2015-07-30 09:00
hdu 5316 Magician(2015 Multi-
University
Training Contest 3)
Magician TimeLimit:18000/9000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others) TotalSubmission(s):329 Accepted
caduca
·
2015-07-28 19:00
Algorithm
编程
ACM
HDU
多校
2015 Multi-
University
Training Contest 3
好吧,脑残的孩子只能慢慢来。。1002、RGCDQ题目传送:RGCDQ人脑残到写了个线段树。。。然后跪啦好久。。。然后就滚去睡觉了其实这个题不需要用到线段树,只需要维护前缀和就ok了,因为f的值很小,所以可以暴力筛出来,然后用一个s[i][j]数组存储,s[i][j]代表前i个f值中有多少个等于j的线段树只有要更新的时候才拿出来!不更新的时候要先想到前缀和!AC代码(前缀和):#include #
u014355480
·
2015-07-28 18:00
代码
ACM
HDU
多校
2015 Multi-
University
Training Contest 3
【比赛链接】:clickhere~~5326:Work【题意】:It’saninterestingexperiencetomovefromICPCtowork,endmycollegelifeandstartabrandnewjourneyincompany.Asisknowntoall,everystuffinacompanyhasatitle,everyoneexceptthebosshasa
u013050857
·
2015-07-28 18:00
多校联合
2015 Multi-
University
Training Contest 2
5305:【题目链接】:clickhere~~【题意】:题意: 给一个图,不存在重边。任意两个人(结点)有线上或者线下的关系,但是每个人线上和线下关系的朋友必须一样多。求有几种方案。=====等效于对图的边黑白染色。每个点的黑色边和白色边要一样。【思路】: 特判如果存在边的度数为奇数的,直接输出0. 只有八个人。实际上最复杂的情况是每个人的边数都是6条。那么枚举每个人,把他们的边染色。选出一半
u013050857
·
2015-07-27 22:00
多校联合
hdu 5307 He is Flying 2015 Multi-
University
Training Contest 2 快速傅里叶变换
HeisFlyingTimeLimit:10000/5000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):91 AcceptedSubmission(s):25ProblemDescriptionJRYwantstodragracingalongalongroad.Thereare n s
firenet1
·
2015-07-24 20:00
HDU
fft
快速傅里叶变换
2015多校联合训练赛
5307
2015 Multi-
University
Training Contest 2
1006Friends刚开始想用邻接矩阵来保存边的关系,不过后来发现实现dfs时很困难。后来又想到了储存边的关系来dfs,这会终于ac了。这几天写了好几道最小生成树的水题,居然一下子想不到用领接表来存储,实在是不应该#include #include #include usingnamespacestd; structdata { intu,v; }e[100]; intn,m,in[10]
xinag578
·
2015-07-24 13:00
UVA-10995 Educational Journey
The
University
of Calgary team qualified for the 28th ACM International Collegiate Programming Contest
·
2015-07-24 09:00
uva
hdu 5308 I Wanna Become A 24-Point Master(2015 Multi-
University
Training Contest 2)
IWannaBecomeA24-PointMaster TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others) TotalSubmission(s):481 AcceptedSub
caduca
·
2015-07-24 09:00
Algorithm
编程
算法
ACM
hdu 5303 Delicious Apples(2015 Multi-
University
Training Contest 2)
DeliciousApples TimeLimit:5000/3000MS(Java/Others) MemoryLimit:524288/524288K(Java/Others) TotalSubmission(s):
caduca
·
2015-07-24 09:00
Algorithm
编程
算法
ACM
2015多校联合训练赛 hdu 5305 Friends 2015 Multi-
University
Training Contest 2 枚举+剪枝
FriendsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):249 AcceptedSubmission(s):103ProblemDescriptionThereare n peopleand m pairsoffriends.Foreverypai
firenet1
·
2015-07-23 20:00
搜索
HDU
2015
多校联合训练赛
5305
2015多校联合训练赛
HDU 5235 Friends (2015 Multi-
University
Training Contest 2 搜索+剪枝)
题目链接:传送门题意:n个人给定m个关系,每个关系为x,y表示x,y是朋友,但是可能是onlinefriends,也可能是offlinefriends.要求每个人的online和offline朋友的数量是一样多的,问有多少种可能。分析:n #include #include #include usingnamespacestd; constintmaxn=10; intdu[maxn]; i
u013790563
·
2015-07-23 19:00
2015多校联合训练赛 hdu 5308 I Wanna Become A 24-Point Master 2015 Multi-
University
Training Contest 2 构造题
IWannaBecomeA24-PointMasterTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):60 AcceptedSubmission(s):16SpecialJudgeProblemDescriptionRecentlyRikkafallsi
firenet1
·
2015-07-23 19:00
HDU
构造
hdu5308
2015多校联合训练赛
2015 Multi-
University
Training Contest 2 1006 Friends
Friends Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5305 Mean: n个人,m对朋友关系,每个人的朋友中又分为在线好友和不在线好友,对于每个人都要保证在线好友和不在线好友一样多,求方案数有多少种。 analyse: 我们用
·
2015-07-23 18:00
test
2015多校联合训练赛hdu 5301 Buildings 2015 Multi-
University
Training Contest 2 简单题
BuildingsTimeLimit:4000/2000MS(Java/Others) MemoryLimit:131072/131072K(Java/Others)TotalSubmission(s):185 AcceptedSubmission(s):25ProblemDescriptionYourcurrenttaskistomakeagroundplanforaresident
firenet1
·
2015-07-23 18:00
HDU
HDU
5301
2015多校联合训练赛
2015 Multi-
University
Training Contest 2 1002 Buildings
Buildings Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5301 Mean: n*m列的网格,删除一个格子x,y,用矩形来填充矩阵。且矩形至少有一边是在矩阵的边缘上。 要使最大矩形的面积最小,求满足条件的矩形填充方式中面积最大的矩
·
2015-07-23 17:00
Build
2015 Multi-
University
Training Contest 1记录
1001OO’sSequence分析:对于样例,可以得到,我们要求的是(1,1)(1,2)(1,3)(1,4)(1,5)(2,2)(2,3)(2,4)(2,5)(3,3)(3,4)(3,5)(4,4)(4,5)(5,5)这些范围内满足题目中所给的要求的i的个数。所以可以将两个求和符号转换为考虑原来ai序列中每一个ai对于结果的贡献。对于题目,刚好可以发现,我们只需要对于每一个ai求离它左右最近的因
xinag578
·
2015-07-23 13:00
hdu 5291 Candy Distribution 2015 Multi-
University
Training Contest 1 树形dp,
CandyDistributionTimeLimit:4000/2000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):217 AcceptedSubmission(s):73ProblemDescriptionWYhasnkindofcandy,number1-N,Thei-thkindo
firenet1
·
2015-07-23 11:00
dp
HDU
HDU
5291
2015多校联合训练赛
2015 Multi-
University
Training Contest 1 - 10010 Y sequence
Y sequence Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5297 Mean: 有连续数列A={1,2,3,4,5,6,7,8 .....},将可以表示成a^b次方的数删除,a={1,2,3,4,5...},而2<=b&
·
2015-07-22 17:00
sequence
2015 Multi-
University
Training Contest 1 - 1009 Annoying problem
Annoying problem Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5296 Mean: 给你一个有根树和一个节点集合S,初始S为空,有q个操作,每个操作要么从树中选一个结点加入到S中(不删除树中节点),要么从S集合中删除
·
2015-07-22 15:00
test
2015 Multi-
University
Training Contest 1 - 1002 Assignment
Assignment Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5289 Mean: 给你一个数列和一个k,求连续区间的极值之差小于k的数的个数。 analyse: 用两个优先队列来维护区间的最大值和最小值,每次插入新值的时候检查区间内
·
2015-07-22 14:00
test
2015 Multi-
University
Training Contest 1 - 1001 OO’s Sequence
OO’s Sequence Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5288 Mean: 给定一个数列,让你求所有区间上满足Ai%Aj!=0(Ai!=Aj)的Ai的个数之和。 analyse: 对于Ai,如果我们知道最靠近Ai且能够整除Ai的数的
·
2015-07-22 14:00
sequence
Hdu 2015 Multi-
University
Training Contest1
1001题面ProblemDescriptionOOhasgotaarrayAofsizen,definedafunctionf(l,r)representthenumberofi(l #include #include #include #include #include #include #include #include #include #include #include #defineL
u013508213
·
2015-07-22 14:00
代码
hdu 5299 Circles Game 2015 Multi-
University
Training Contest 1 计算几何+博弈SG函数 圆的扫描线
CirclesGameTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):251 AcceptedSubmission(s):51ProblemDescriptionTherearencirclesonainfinitelylargetable.Withev
firenet1
·
2015-07-22 12:00
HDU
计算几何
扫描线
5299
2015多校联合训练赛
博弈sg函数
hdu 5289 Assignment(2015 Multi-
University
Training Contest 1)
Assignment TimeLimit:4000/2000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others) TotalSubmission(s):755 AcceptedSubmiss
caduca
·
2015-07-22 11:00
Algorithm
编程
算法
ACM
hdu 5288 OO’s Sequence(2015 Multi-
University
Training Contest 1)
OO’sSequence TimeLimit:4000/2000MS(Java/Others) MemoryLimit:131072/131072K(Java/Others) TotalSubmission(s):1080 AcceptedS
caduca
·
2015-07-22 11:00
Algorithm
编程
ACM
hdu 5289 Assignment 2015 Multi-
University
Training Contest 1
AssignmentTimeLimit:4000/2000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):86 AcceptedSubmission(s):43ProblemDescriptionTomownsacompanyandheistheboss.Therearenstaffswhi
firenet1
·
2015-07-21 18:00
HDU
2015
多校联合训练赛
hdu 5288 OO’s Sequence 2015 Multi-
University
Training Contest 1
OO’sSequenceTimeLimit:4000/2000MS(Java/Others) MemoryLimit:131072/131072K(Java/Others)TotalSubmission(s):83 AcceptedSubmission(s):34ProblemDescriptionOOhasgotaarrayAofsizen,definedafunctionf(l,r
firenet1
·
2015-07-21 18:00
HDU
多校联合训练赛
hdu 5294 Tricks Device 2015 Multi-
University
Training Contest 1
题目:给一个图,起点1,终点n必须走最短路才能从起点到终点。问至少删除几条边使得无法从起点到终点。且删除最多几条边,还可以从起点到终点。分析:做最短路,所有满足dist[u]=dist[v]+w(v,u)的边都是最短路的边,对这样的边,重新建图。新图加入e(u,v),边权为1t到s作最短路d,就是最少需要的边数能够到达边数,总边数-d就是最多能删除的边对新图t,s作网络流,求最小割,就是最少需要删
firenet1
·
2015-07-21 18:00
HDU
多校联合训练赛
杭电oj题目和分类
两个数比较水题10031、2、3、4、5...简单题1004渊子赛马排序+贪心的方法归并1005HeroInMaze广度搜索1006Redraiment猜想数论:容斥定理1007童年生活二三事递推题1008
University
jinjide_ajin
·
2015-07-21 15:00
hdoj
学习笔记10:Scala单例对象、伴生对象
//伴生类 classUniversity{ //调用伴生对象的方法 valid=
University
.newStudenNo privatevarnumber=0 defaClass(number:Int
nysyxxg
·
2015-07-21 10:00
Integer Partition(hdu4658)2013 Multi-
University
Training Contest 6 整数拆分二
IntegerPartitionTimeLimit:2000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):524AcceptedSubmission(s):238ProblemDescriptionGivenn,k,calculatethenumberofdifferent(unordered
u010579068
·
2015-07-17 15:00
partition
Integer
2013
递推
整数拆分
hdu4658
Multi-Universit
Partition(hdu4651)2013 Multi-
University
Training Contest 5----(整数拆分一)
PartitionTimeLimit:6000/3000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):954AcceptedSubmission(s):545ProblemDescriptionHowmanywayscanthenumbers1to15beaddedtogethertomake15?Th
u010579068
·
2015-07-16 23:00
数论
2013
hdu4651
五边形数
Multi-Universit
上一页
29
30
31
32
33
34
35
36
下一页
按字母分类:
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
其他