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
interesting!
多校第三场 1006 hdu 5323 Solve this
interesting
problem(dfs)
题目链接:点击打开链接题目大意:给出一个区间,问存在以这个区间为左右区间的节点的最小的线段树。题目分析:首先对于线段树的一个节点,假设它的区间是[l,r],那么它的父亲的区间可能是[L,2*R-L+1] , [L,2*R-L] , [2*L-2-R,R] ,[2*L-R-1,R]那么暴力求解即可。那么暴力求解的复杂度是什么呢?首先因为L/区间长度 #include usingname
qq_24451605
·
2015-07-29 17:00
C++
DFS
hdu5323(2015多校3)--Solve this
interesting
problem(万万没想到,,,)
题目链接:点击打开链接题目大意:给出一个区间[l,r],问这个区间能不能是一个线段树上的一段,线段树为0到n,求最小的n是多少。按照题目给出的区间向根部搜,由子区间推到父区间,有四种可能(左右区间和(l+r)的奇偶性):[l,2*r-l][l,2*r+1-l] [(l-1)*2-r,r][(l-1)*2+1-r,r]按照这四种方式向上搜,加上剪枝就可以AC原因是l/(r-l+1)=n就return
u013015642
·
2015-07-29 14:00
hdu5323Solve this
interesting
problem 暴搜
//给一对数[l,r] //问找出最小的n使得线段树的根节点的左右范围是[0,n],且 //该线段树中有左右范围为[l,r]的节点 //由于l/(r-l+1)≤2015 //可以直接暴力搜索以[l,r]为节点的其父亲节点的情况 //然后比较其最小值 #include #include #include usingnamespacestd; typedeflonglongll; const__int
cq_pf
·
2015-07-29 12:00
暴力
HDOJ 5323 Solve this
interesting
problem BFS搜索
BFS暴力搜索.....SolvethisinterestingproblemTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):974 AcceptedSubmission(s):263ProblemDescriptionHaveyoulearnedsom
u012797220
·
2015-07-28 23:00
hdu 5323 Solve this
interesting
problem(dfs)
题目链接:hdu5323Solvethisinterestingproblem逆向思维,每次向左或向右翻倍,知道左端点为0时,即恰好满足的情况,处理处所有情况去取最小值。#include #include #include usingnamespacestd; typedeflonglongll; constllinf=0x3f3f3f3f; llL,R,N; voiddfs(lll,llr
u011328934
·
2015-07-28 20:00
HDU 5323 SOLVE THIS
INTERESTING
PROBLEM 爆搜
链接SolvethisinterestingproblemTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):511 AcceptedSubmission(s):114ProblemDescriptionHaveyoulearnedsomethingabou
qq574857122
·
2015-07-28 20:00
HDU 5323 Solve this
interesting
problem
搜索。。。SolvethisinterestingproblemTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):422 AcceptedSubmission(s):98ProblemDescriptionHaveyoulearnedsomethingab
u011788531
·
2015-07-28 19:00
HDU 5323 Solve this
interesting
problem
ProblemDescriptionHaveyoulearnedsomethingaboutsegmenttree?Ifnot,don’tworry,Iwillexplainitforyou.SegmentTreeisakindofbinarytree,itcanbedefinedasthis:-ForeachnodeuinSegmentTree,uhastwovalues: Lu and Ru.
jtjy568805874
·
2015-07-28 19:00
HDU
Multi-threading Model: My
Interesting
Part in Android
Multi-threadingModel:MyInterestingPartinAndroidTOBECONTINUED
Derek_Zhang_
·
2015-07-21 22:00
[LeetCode] Climbing Stairs
Well, a classic and
interesting
problem.
·
2015-07-15 00:00
LeetCode
[LeetCode] Container With Most Water
Well, an
interesting
problem.
·
2015-07-14 21:00
LeetCode
[LeetCode] The Skyline Problem
An
interesting
problem! But not very easy at first glance.
·
2015-07-13 23:00
LeetCode
3. 请远离“大脑只用了10%”这种鬼话
」里说过:“Itisestimatedmosthumanbeingsonlyuse10percentoftheirbrain’scapacity.Imagineifwecouldaccess100%.
Interesting
Dark
·
2015-07-05 06:38
3. 请远离“大脑只用了10%”这种鬼话
」里说过:“Itisestimatedmosthumanbeingsonlyuse10percentoftheirbrain’scapacity.Imagineifwecouldaccess100%.
Interesting
Dark
·
2015-07-05 06:38
12个有趣的C语言面试题及答案
转自:http://www.codeceo.com/article/12-
interesting
-c-programs.html12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个
u011331383
·
2015-06-28 22:00
Easy WordPress Updates: Store FTP Info in wp-config.php
Saw an
interesting
blog post on Twitter today about storing WordPress FTP information in wp-config.php
·
2015-06-07 12:00
wordpress
HDU3304 POJ3146
Interesting
Yang Hui Triangle Lucas定理
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3304 http://poj.org/problem?id=3146题目大意:找出杨辉三角中第n+1行不能被素数p整除的数有多少个。分析:这题是HDU4349的加强版。同样是Lucas定理解决。我们知道,对于一个组合数C(n,m)modp来说,我们用a[k]a[k-1]...a[0],b[k]b
AC_Gibson
·
2015-05-29 20:00
What are some
interesting
things to do with Python?
sourece:http://www.quora.com/Python-programming-language-1/What-are-some-
interesting
-things-to-do-with-PythonPython
u013805817
·
2015-05-23 22:00
python
sdut2414 An
interesting
game 费用流
AninterestinggameTimeLimit:2000ms Memorylimit:65536K 有疑问?点这里^_^题目描述XiaoMingrecentlydesignsalittlegame,infrontofplayerthereareNsmallhillsidesputinorder,nowXiaoMingwantstoincreasesomehillsidestoblockt
corncsd
·
2015-04-13 20:00
Using WebViews and JavaScript
If you want to leverage your web development skills to build Android apps, another
interesting
option
zsjg13
·
2015-03-26 23:00
android
webkit
webView
URAL 1385
Interesting
Number
DescriptionTyomitchcallsthenumberwith2 N digits(withoutleadingzeroes)"
interesting
",ifit'sdivisiblebyboththenumberformedfromitsfirstN
wust_ZJX
·
2015-03-12 20:00
A and B and
Interesting
Substrings(前缀和+map)
sum数组表示区间前缀和。如果位置i+1到位置j-1的和为零,那么sum[i]=sum[j-1],既sum[i]+a[k]=sum[j](i和j位置字母为k)这样的话对每个字母枚举所有位置做起终点是可以的,但是时间复杂度为N^2。考虑用一个map维护前缀和中每个值出现的次数,这样可以用log时间查看某个值的前缀和存不存在。代码:// //main.cpp //294D.AandBandIntere
Baoli1008
·
2015-03-05 23:00
map
前缀和
A and B and
Interesting
Substrings
D.AandBandInterestingSubstringstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAandBarepreparingthemselvesforprogrammingcontests.Afterseveralyearsofdoingspo
u012797220
·
2015-03-05 16:00
ruby regular Expressions
,re) if a =~ re "#{$`}<<#{$&}>>#{$'}" else "no match" end end puts show_regexp('very
interesting
枫爱若雪
·
2015-03-03 10:00
Ruby
regular
Expressions
A and B and
Interesting
Substrings(学习利用map容器提高效率的技巧)
Link:http://codeforces.com/contest/519/problem/DD.AandBandInterestingSubstringstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAandBarepreparingthemselvesfo
Enjoying_Science
·
2015-03-01 23:00
算法
ACM
Codeforces Round #294 Div2 D(A and B and
Interesting
Substrings)
Problem给一个长度为N的字符串S,字符集是[a,z],每个字符都有一个权值Vi,求有多少个子串subS满足以下条件:1.|subS|>=22.subS[0]=subS[|subS|−1]3.∑|subS|−2i=1Vi=0LimitsTimeLimit(ms):2000MemoryLimit(MB):256N∈[1,105]Vi∈[−105,105]LookupOriginalProblem
UESTC_peterpan
·
2015-03-01 20:00
前缀和
map统计
A and B and
Interesting
Substrings
D.AandBandInterestingSubstringstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAandBarepreparingthemselvesforprogrammingcontests.Afterseveralyearsofdoingspo
u014355480
·
2015-03-01 18:00
ACM
codeforces
#294 (div.2) D.A and B and
Interesting
Substring
1.题目描述:点击打开链接2.解题思路:本题要求在s中找满足下列条件的字串:(i)i+1~j-1的字符串权值之和为0;(ii)s[i]==s[j];处理带权字符串的一般解法是利用前缀和。但我最初的算法效率十分低下:先求出前i个字符的权和。并将26个字母出现的位置依次保存到vector中。随后从0~len依次枚举每个位置的字符s[i],并枚举它的下一个出现位置,再计算这段子串是否满足条件(1)。这种
u014800748
·
2015-03-01 16:00
字符串
前缀和
HDU 2814 -
Interesting
Fibonacci (Fibonacci性质 + 循环节)
题意G(1)=F(ab)G(n)=G(n−1)F(ab)(n>=2)求G(n)modc思路求abmodc还有这么一个公式.ab≡(amodc)bmodϕ(c)+ϕ(c)(modc),b>=ϕ(c)所以这个题目就变成了求ans=F(ab)F(ab)n−1modc=(F(ab)modc)F(ab)modϕ(c)+ϕ(c)modc而Fibonacci数列有一个性质,它的n次方取模会出现一个循环节。假设循
u014247806
·
2015-02-20 18:00
ACM
HDU 2351 - One is an
Interesting
Number (模拟)
题意给出一坨性质,问一个集合里满足性质最多的数思路在数论专题里的题目,明明是个模拟题==坑按照性质一条一条对照过去即可。我先预处理了所有平方立方四次方的数。然后处理每个数的sum、multiple、square等因为只有100个数,可以O(n2)循环一遍。代码#include #include #include #include #include #include #include #includ
u014247806
·
2015-02-10 13:00
ICPC
ZFS on Linux
Compared to other filesystems, it’s quite
interesting
as it combines both a filesystem and a logical
tonydlut
·
2015-01-02 21:00
linux
CF 483D -
Interesting
Array(TODO)
题目链接:Clickhere~~题意:给一个长度为n的数列{a_n},然后给m条信息,每条信息给出[l_i,r_i]区间中各个数字的按位与的结果。问信息是否冲突,不冲突的话给出任意一种符合条件的数列。思路:xxx
dgq8211
·
2014-12-01 14:00
Codeforces Round #275 (Div. 1)B(线段树+位运算)
B.InterestingArraytimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputWe'llcallanarrayof n non-negativeintegers a[1], a[2], ..., a[n]
interesting
cq_phqg
·
2014-11-08 13:00
ACM
codeforces
Interesting
Array 线段树
B.InterestingArraytimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputWe'llcallanarrayof n non-negativeintegers a[1], a[2], ..., a[n]
interesting
u012797220
·
2014-11-08 10:00
Codeforces 482B
Interesting
Array(线段树)
题目链接:Codeforces482BInterestingArray题目大意:给定一个长度为N的数组,现在有M个限制,每个限制有l,r,q,表示从a[l]~a[r]取且后的数一定为q,问是否有满足的数列。解题思路:线段树维护,每条限制等于是对l~r之间的数或上q(取且的性质,相应二进制位一定为1),那么处理完所有的限制,在进行查询,查询对应每个l~r之间的数取且是否还等于q。所以用线段树维护取且
u011328934
·
2014-11-03 10:00
VF
But how can he do that if the most
interesting
facts
·
2014-11-02 17:00
Codeforces Round #275 (Div. 2) D题 (线段树)
D.InterestingArraytimelimitpertest1secondmemorylimitpertest256megabytesWe'llcallanarrayofnnon-negativeintegersa[1], a[2], ..., a[n]
interesting
Tc_To_Top
·
2014-10-31 02:00
线段树
Interesting
Array【线段树区间更新】
题目:codeforces482B.InterestingArray题意:给你一个值n和m中操作,每种操作就是三个数l,r,val。就是区间l---r上的与的值为val,最后问你原来的数组是多少?如果不存在输出no分析:分析发现要满足所有的区间,而一个点上假如有多个区间的话,这个点的值就是所有区间或的值,因为只有这样才能满足所有区间的,把所有位上的1都保存下来了,那么可以发现用线段树来维护,但是那
y990041769
·
2014-10-29 19:00
Algorithm
C++
线段树
codeforces
Codeforces 482B
Interesting
Array 构造+线段树判可行
题目链接:点击打开链接题意:构造一个n长的序列,m个限制:每个限制[l,r]q序列要满足区间[l,r]的所有数&起来结果是q思路:直接构造,然后判可行就好了。。#include #include #include #include template inlineboolrd(T&ret){ charc;intsgn; if(c=getchar(),c==EOF)return0; while(c!=
qq574857122
·
2014-10-25 22:00
Interesting
Array
题意就是,给定n,m.求n个数,满足m个条件。每个条件的形式是,给定Li,Ri,Qi,要求 a[Li]&a[Li+1]&...&a[Ri]=Qi;Qi最多有30个二进制位。所以每个数都可以用int存下。对于Qi的每一位,若为1,则 a[Li],a[Li+1],...,a[Ri]的这一位都必须为1;(按位或)若为0,则 a[Li],a[Li+1],...,a[Ri]至少有一位为零;(尽量让它们全零,
u012891242
·
2014-10-25 07:00
Unit 5: Reading
youwilllearntowriteparagraphs.Followingthefivestepsofthewritingprocess,youwilldiscoverthatwritingadetailed,
interesting
lsxpu
·
2014-10-17 21:00
Moving OCR and Voting Disk to Oracle ASM Online
files in multiple raw devices, shared between the nodes of a cluster.From this version on, it’s very
interesting
czmmiao
·
2014-10-12 16:00
oracle
2013年湖南省第九届程序设计大赛 I
Interesting
Calculator (dp)
题意:给你一个x,y给你三十个操作,每种操作的花费为c[i],求x变成y所需的最小花费和最小花费下的操作次数 方法: 我最开始以后变成i的花费dp[i]=dp[i-j] + j变成i的花费,后面wa很多次了之后才发现j不一定比i小 因为有个操作是*0,递推的时候是从x递推到y,没有经过x变成0,0变成y,所以这个操作会使得递推时出现错误; 除去这个操作之外的
u012659423
·
2014-10-09 10:00
dp
有趣的Swift特性
//www.cocoachina.com/industry/20140703/9019.html 原文:https://mikeash.com/pyblog/friday-qa-2014-06-20-
interesting
-swift-features.html
xn4545945
·
2014-09-15 22:00
泛型
swift
特性
结构
XDOJ1265 - A^B % P
Description A^B % P is a very
interesting
problem. Here a more bigger problem needs you to solve.
CHS007chs
·
2014-08-30 09:00
HDU 2426
Interesting
Housing Problem(二分图最优匹配)
HDU2426InterestingHousingProblem(二分图最优匹配)http://acm.hdu.edu.cn/showproblem.php?pid=2426题意: 有N个学生和M个房间,每个学生可能会给多个房间打分.如果分数>=0,表示他可以选择这个房间.(如果分数0的房间?如果存在输出分数和的最大值,如果不存在输出-1.分析: 首先明显当输出N>M的时候直接
u013480600
·
2014-08-22 12:00
Algorithm
算法
ACM
Stringsobits(DP)
This set of strings is
interesting
because it is ordered and c
Simone_chou
·
2014-08-13 17:00
String
ALTER INDEX COALESCE: 10g Improvements
I thought it might be worth mentioning some
interesting
changes in the manner in which the ALTER INDEX
czmmiao
·
2014-08-02 21:00
COALESCE
HDU 3295 An
interesting
mobile game
IDA*水题。。。。AninterestingmobilegameTimeLimit:3000/1000MS(Java/Others) MemoryLimit:65535/32768K(Java/Others)TotalSubmission(s):281 AcceptedSubmission(s):132ProblemDescriptionXQ,oneofthethreeSailorm
u011788531
·
2014-08-01 10:00
数据结构
算法
搜索
数学
ACM
gem5 parsec2.1 Region of Interest explations
ThePARSEChookfunctionsalsodefineaRegion-of-Interestforeachworkload.Thiscoderegionisthepartoftheworkloadwhichperformsthe"
interesting
"computations.Itincludesthewholeparallelphase
fandroid
·
2014-07-30 16:00
GEM5
parsec
上一页
16
17
18
19
20
21
22
23
下一页
按字母分类:
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
其他