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
shortest
The
shortest
problem(hdu5373+11的倍数)
Theshortestproblem TimeLimit:3000/1500MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):503 AcceptedSubmission(s):257ProblemDescriptionInthisproblem,weshouldsolveaninterest
u010579068
·
2015-08-11 23:00
problem
the
Shortest
多校7
hdu5373
11的倍数
HDOJ 5373 The
shortest
problem 水
TheshortestproblemTimeLimit:3000/1500MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):374 AcceptedSubmission(s):183ProblemDescriptionInthisproblem,weshouldsolveaninteresti
u012797220
·
2015-08-11 20:00
HDU 5373 The
shortest
problem
ProblemDescriptionInthisproblem,weshouldsolveaninterestinggame.Atfirst,wehaveanintegern,thenwebegintomakesomefunnychange.Wesumupeverydigitofthen,theninsertittothetailofthenumbern,thenletthenewnumberbe
jtjy568805874
·
2015-08-11 19:00
HDU
hdu 5373 the
shortest
problem
根据同余定理,可得性质:奇偶位的和之差能被11整除,则该数能被11整除。用c++超时,用G++就过了,(╯°Д°)╯︵┴┴#include #include #include #include #include #include #include #include #include #include #include #pragmacomment(linker,"/STACK:1024000000
u014679804
·
2015-08-11 19:00
【HDOJ 5373】The
shortest
problem
【HDOJ5373】Theshortestproblem暴力比赛时用字符串做无限超时后来更新各种姿势最后直接打表打出前120W个数的各位加和。。。还是跑了很久回来后想到用数组。。。不提了==全是泪……代码如下://字符串挫代码 #include #include #include #include #include #include #include #include #include #incl
ChallengerRumble
·
2015-08-11 18:00
暴力
HDU 5373 The
shortest
problem(这题算模拟吧)
TheshortestproblemTimeLimit:3000/1500MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):0 AcceptedSubmission(s):0ProblemDescription Inthisproblem,weshouldsolveaninteres
queuelovestack
·
2015-08-11 17:00
模拟
ACM
POJ 3068 "
Shortest
" pair of paths(最小费用最大流-mcmf)
Description给一个有向带权图,求两条从0-N-1的路径,使它们没有公共点且边权和最小Input多组用例,每组用例第一行为两个整数N和M表示点数和边数,之后M行每行三个整数a,b,c表示a和b间有一条边权为c的边,以00结束输入Output对于每组用例,如果存在两条没有公共点的从0~N-1的最短路则输出这两条最短路的边权和,否则输出NotpossibleSampleInput2101202
V5ZSQ
·
2015-08-11 16:00
CodeForces 3A -
Shortest
path of the king
这种题一般都是用bfs做的。。。。不过好像这样更简单。#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include us
MrSiz
·
2015-08-07 10:00
算法
CF
初学图论-DAG单源最短路径算法
/** * DAG's Single Source
Shortest
Path Algorithm in C++ * Based on DFS, don't l
不高不富不帅的陈政_
·
2015-08-06 18:00
C++
图论
DAG
单源最短路径
邻接链表
初学图论-Bellman-Ford单源最短路径算法
/** * Bellman-Ford's Single Source
Shortest
Path Algorithm in C++ * Time Cost : O(|N||M|) * Introduction
不高不富不帅的陈政_
·
2015-08-06 18:00
C++
图论
邻接链表
单源最短路径
Bellman-Ford
POJ 2001
Shortest
Prefixes 【 trie树(别名字典树)】
ShortestPrefixesTimeLimit: 1000MS MemoryLimit: 30000KTotalSubmissions: 15574 Accepted: 6719DescriptionAprefixofastringisasubstringstartingatthebeginningofthegivenstring.Theprefixesof"carbon"are:"c","c
ACMore_Xiong
·
2015-08-06 17:00
数据结构
poj
Trie树
hdu2224The
shortest
path 经典问题之 旅行商问题
//平面上有n个点//问去的路只能从左到右,回的路只能从到右左的且来回必须经过所有点的最小路径//dp[i][j]表示以j为起点,1为拐点,i为终点的最短路//j
cq_pf
·
2015-08-06 11:00
dp
POJ - 2001
Shortest
Prefixes字典树记录
POJ-2001ShortestPrefixesTimeLimit: 1000MS MemoryLimit: 30000KB 64bitIOFormat: %I64d&%I64uSubmit StatusDescriptionAprefixofastringisasubstringstartingatthebeginningofthegivenstring.Theprefixesof"carbon
qq_18661257
·
2015-08-06 00:00
hdu2807The
Shortest
Path floyd
//对于矩阵A,B,CA*B=C //那么A,C之间有一条路 //找出A,C的最短路 #include #include #include usingnamespacestd; constintmaxn=110; constintinf=0x3f3f3f3f; intA[maxn][maxn][maxn]; intmap[maxn][maxn]; inttmp[maxn][maxn]; intn,
cq_pf
·
2015-08-05 12:00
floyd
[LeetCode]
Shortest
Palindrome I
相关问题1:最长回文子串相关问题2:MinimuminsertionstoformapalindromeGivenastringS,youareallowedtoconvertittoapalindromebyaddingcharactersinfrontofit.Findandreturntheshortestpalindromeyoucanfindbyperformingthistransfo
jiyanfeng1
·
2015-08-03 11:00
hdu1595find the longest of the
shortest
最短路
//给一个无向图,问删除一条边,使得从1到n的最短路最长 //问这个最长路 //这个删除的边必然在最短路上,如果不在,那么走这条最短路肯定比其他短 //枚举删除这条最短路的边,找其最长的即为答案 #include #include #include usingnamespacestd; constintmaxn=1110; constintinf=0x3f3f3f3f; structEdge {
cq_pf
·
2015-08-01 11:00
最短路
暑假- Trie树-(A -
Shortest
Prefixes)
/* 题意:找出能唯一标示一个字符串的最短前缀,如果找不出,就输出该字符串。 思路:trie树,所谓唯一最短前缀,就是这个前缀的最后一个字母在之前所有输入的 字符串中只出现过一次(除了找不到的以外),构树的时候每个字母出现一次再所对应的 value++,最后判断这个串的哪个字母是首个出现了一次的字母,则从这个串开始到这个 首次出现了一次的字母结束就是对应的唯一前缀。 */ #include #in
slime_kirito
·
2015-07-28 09:00
数据结构树
Linkedin Interview -
Shortest
distance between two words
tokenized * from a paragraph of text), and will provide a method that takes two * words and returns the
shortest
yuanhsh
·
2015-07-26 14:00
interview
Leetcode
Shortest
Palindrome (最短回文串)
LeetcodeShortestPalindrome(最短回文串)题目描述 GivenastringS,youareallowedtoconvertittoapalindromebyaddingcharactersinfrontofit.Findandreturntheshortestpalindromeyoucanfindbyperformingthistransformation. For
yujin753
·
2015-07-24 21:00
LeetCode
[leedcode 126] Word Ladder
Given two words (beginWord and endWord), and a dictionary, find the length of
shortest
transformation
·
2015-07-24 21:00
code
LeetCode#111 Minimum Depth of Binary Tree
The minimum depth is the number of nodes along the
shortest
path from the root node down to the nearest
·
2015-07-21 20:00
LeetCode
P - The
Shortest
Path in Nya Graph-hdu4725(双端队列+拆点)
题意:有N个点和N层..一层有X个点(0<=X<=N).两邻两层间有一条路花费C。还有M条小路在两个点之间。问从第一个点走到第N个点最短路是多少... 可以考虑在每一层增加一个点,这个点到上下层的距离是C,与本层的距离是0; T的很惨,不太明白为什么,翻了一下大神的博客,发现这个要把每层拆成两个点来算的,要是只拆成一个点那么本层到本层的点都会是0了 ///////
·
2015-07-20 17:00
Graph
Shortest
Distance (20)
题目如下:Thetaskisreallysimple:givenNexitsonahighwaywhichformsasimplecycle,youaresupposedtotelltheshortestdistancebetweenanypairofexits.InputSpecification:Eachinputfilecontainsonetestcase.Foreachcase,thef
xyt8023y
·
2015-07-17 11:00
算法
pat
Shortest
Palindrome
GivenastringS,youareallowedtoconvertittoapalindromebyaddingcharactersinfrontofit.Findandreturntheshortestpalindromeyoucanfindbyperformingthistransformation.Forexample:Given"aacecaaa",return"aaacecaaa"
brucehb
·
2015-07-14 00:00
HDU 4871
Shortest
-path tree (最短路+树上点分治)
题目地址:HDU4871先用最短路求出根节点到其它各点的最短距离,然后利用最短距离DFS一下构造出最短路树,然后剩下的就是在构造出来的这棵树上做树分治,很简单的树分治。代码如下:#include #include #include #include #include #include #include #include #include #include usingnamespacestd; #d
u013013910
·
2015-07-12 09:00
遍历
ACM
算法与数据结构
树上点分治
【二分+最大团】【HDU3585】【maximum
shortest
distance】
题目大意在N个点钟选出K个点使得这K个点间的最小距离最大二分距离,然后如果两点间距离小于它的边当做不存在,求出最大团,如果最大团>=K,向上缩小区间 #include #include #defineeps1e-7 usingnamespacestd; intn,k,vis[55],tmax,dp[55],ji; intlocat[55][2],map[55][55]; doubledis[55
zy691357966
·
2015-07-05 13:00
Shortest
Palindrome ---再见回文和KMP
题目大意 给定串S,要求在其前面(infrontof)增加最少的串构成回文并输出回文串。解题思路 席八,这个题目无愧其hard的标签,我想破脑袋也才想了个宽搜的暴力,而且还忽略了要加载S串前面的基本要求,审题不仔细,还是太浮躁了。这题没做出来,仔细琢磨了网上的解法,现总结如下: 先明确几个理论,以后想回文相关的题目从这几点入手: 1、回文串=revers
zhang360896270
·
2015-07-01 13:00
Leetcode - Word Ladder II
Given two words (start and end), and a dictionary, find all
shortest
transformation sequence(s) from
likesky3
·
2015-06-26 09:00
LeetCode
Leetcode - Word Ladder
Given two words (beginWord and endWord), and a dictionary, find the length of
shortest
transformation
likesky3
·
2015-06-23 10:00
LeetCode
[LeetCode-JAVA]
Shortest
Palindrome
Find and return the
shortest
palindrome you can find by performing this transformation. For e
·
2015-06-18 21:00
LeetCode
[LeetCode-JAVA] Word Ladder II
题目: Given two words (start and end), and a dictionary, find all
shortest
transformation sequence
·
2015-06-14 14:00
LeetCode
Leetcode -
Shortest
Palindrome
Find and return the
shortest
palindrome you can find by performing this transformation. For exampl
likesky3
·
2015-06-13 10:00
LeetCode
hdu 3631
Shortest
Path(Floyd)
#include #include #include constintN=305; usingnamespacestd; intmain() { intcas=0,n,m,q,i,j,k,x,y,t,g[305][305],vis[305],inf=1t)g[x][y]=t; } printf("Case%d:\n",++cas); for(k=0;k=inf)printf("Nosuchpat
xinag578
·
2015-06-11 19:00
[LeetCode]
Shortest
Palindrome
The basic idea is as follows: find the longest palindromic string that contains the first character of s. Then get the substring after this longest palindrome substring, reverse it and add it to the h
·
2015-06-11 01:00
LeetCode
[LeetCode] Word Ladder II 词语阶梯之二
Given two words (start and end), and a dictionary, find all
shortest
transformation sequence(
·
2015-06-03 02:00
LeetCode
[LeetCode] Word Ladder 词语阶梯
Given two words (beginWord and endWord), and a dictionary, find the length of
shortest
transformation
·
2015-05-30 07:00
LeetCode
poj 2001
Shortest
Prefixes 【字典树】【找每一个字符串在字符串集里面的 最短且可唯一标识 的前缀】
ShortestPrefixesTimeLimit:1000MS MemoryLimit:30000KTotalSubmissions:14747 Accepted:6364DescriptionAprefixofastringisasubstringstartingatthebeginningofthegivenstring.Theprefixesof"carbon"are:"c","ca","
chenzhenyu123456
·
2015-05-29 13:00
LeetCode 214 -
Shortest
Palindrome
GivenastringS,youareallowedtoconvertittoapalindromebyaddingcharactersinfrontofit.Findandreturntheshortestpalindromeyoucanfindbyperformingthistransformation.Forexample:Given "aacecaaa",return "aaacecaa
yuanhisn
·
2015-05-28 10:00
Topological Sorting - Find
Shortest
String Character Order
ProblemstatementYouaregivenNsubsequences(notnecessarilycontiguous)ofastring.Findtheshortestpossiblestringwhichhasdistinctlowercaseletters,withthegivensubsequences.Thesolutionisguaranteedtoexist. Inpu
yuanhisn
·
2015-05-28 10:00
Topological Sorting - Find
Shortest
String Character Order
Find the
shortest
possible string which has distinct lower case letters, with the given subsequences.
yuanhsh
·
2015-05-27 14:00
character
Topological Sorting - Find
Shortest
String Character Order
Find the
shortest
possible string which has distinct lower case letters, with the given subsequences.
yuanhsh
·
2015-05-27 14:00
character
LeetCode 214 -
Shortest
Palindrome
Find and return the
shortest
palindrome you can find by performing this transformation. For exampl
yuanhsh
·
2015-05-26 22:00
LeetCode
LeetCode 214 -
Shortest
Palindrome
Find and return the
shortest
palindrome you can find by performing this transformation. For exampl
yuanhsh
·
2015-05-26 22:00
LeetCode
leetcode 214:
Shortest
Palindrome
ShortestPalindromeTotalAccepted:172TotalSubmissions:1344GivenastringS,youareallowedtoconvertittoapalindromebyaddingcharactersinfrontofit.Findandreturntheshortestpalindromeyoucanfindbyperformingthistra
xudli
·
2015-05-23 06:00
java
LeetCode
Algorithm
C++
python
LeetCode 题解(91):
Shortest
Palindrome
题目:GivenastringS,youareallowedtoconvertittoapalindromebyaddingcharactersinfrontofit.Findandreturntheshortestpalindromeyoucanfindbyperformingthistransformation.Forexample:Given"aacecaaa",return"aaaceca
u011029779
·
2015-05-23 05:00
Algorithm
LeetCode
面试题
[LeetCode]
Shortest
Palindrome 最短回文串
Find and return the
shortest
palindrome you can find by performing this transformation. Fo
·
2015-05-23 03:00
LeetCode
【codechef】Special
Shortest
Walk(STL妙用,优先队列)
1≤SumofNoveralltestcases≤100000 1≤SumofMoveralltestcases≤500000 3≤N≤100000 2≤M≤500000 1≤T≤2000 1≤Z≤100000000 1≤X,Y≤N X!=Y source!=sinkandtherearenomultiedges. sourceandsinkwillnotbeconnectedbyadirecte
cacyth
·
2015-05-18 14:00
HDU 4725 The
Shortest
Path in Nya Graph (最短路)
TheShortestPathinNyaGraphTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):3368 AcceptedSubmission(s):779ProblemDescriptionThisisaveryeasyproblem,yourtas
lwt36
·
2015-05-13 11:00
oracle
shortest
_path
CREATEORREPLACEPACKAGEshortest_path_pkgAS TYPEnode_dist_rtISRECORD(fpointINT,dvalueINT); TYPEnode_dist_ttISTABLEOFnode_dist_rtINDEXBYPLS_INTEGER; TYPEgraph_node_rtISRECORD(NAMEVARCHAR2(100),isvisitedB
小牛快跑he
·
2015-05-05 16:39
oracle
Path
Shortest
hihoCoder1107
Shortest
Proper Prefix Tire树
题目链接:hihoCoder1107题目大意:给你n个字符串,定义properprefix为其中某个字符串s的前缀满足:在这n个字符串中出现的次数不超过5次;定义shortestproperprefix为其中某个字符串s满足:s是properprefix且s的所有前缀(不包括s本身)都不是properprefix.现在让找出这n个字符串中shortestproperprefix的个数。分析:以这n
AC_Gibson
·
2015-05-05 11:00
上一页
14
15
16
17
18
19
20
21
下一页
按字母分类:
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
其他