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
Safecracker
HDU 1015
Safecracker
(很棒的一道DFS)
题意:输入一个数target和一个字符串s,在字符串 s找出一个由5个字符组成的最大字符串使得v-w^2+x^3-y^4+z^5=target;ProblemDescription===Optechbriefing,2002/11/0206:42CST=== "TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.K
h1021456873
·
2015-08-14 13:00
HDOJ 1015
Safecracker
(DFS)
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):10499 AcceptedSubmission(s):5371ProblemDescription===Optechbriefing,2002/11/0206:42CST==="Th
helloiamclh
·
2015-08-07 21:00
HDU 1015
Safecracker
题目地址:点击打开链接思路:本来挺简单的,结果犯了一个大错误,把错误代码也贴上来,要求按字典序最大,只要刚开始从大到小排序就行 ,还有就是明白了老师为啥告诉我们要好好学英语,这样就能用英语定义变量了,不只用a,b,c,d,cf,lol,这些破词来定义了,代码把cf敲成c,结果害的我调了2个小时,每个代码都是一部血泪史啊错误代码1:#include #include #include inta,n,
qq_25605637
·
2015-07-25 14:00
Safecracker
SafecrackerTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):10165AcceptedSubmission(s):5213ProblemDescription===Optechbriefing,2002/11/0206:42CST===“Theitemisl
huayunhualuo
·
2015-06-25 21:00
HDU-1015-
Safecracker
(Java && 暴力大法好 && 简单字典序)
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):9965 AcceptedSubmission(s):5097ProblemDescription===Optechbriefing,2002/11/0206:42CST=== "Th
qq_16542775
·
2015-05-13 23:00
java
ACM
HDU
简单题
字典序
ZOJ - 1403
Safecracker
ZOJ-1403SafecrackerDescription===Optechbriefing,2002/11/0206:42CST==="TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,alongwithKleinandhisfacto
axiqia
·
2015-03-28 23:00
HDU 1015
Safecracker
ProblemDescription===Optechbriefing,2002/11/0206:42CST=== "TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,alongwithKleinandhisfactory,weredest
lishuzhai
·
2015-03-15 13:00
zoj 1403
Safecracker
枚举
SafecrackerTimeLimit: 2Seconds MemoryLimit: 65536KB===Optechbriefing,2002/11/0206:42CST==="TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,
u014451076
·
2015-03-13 21:00
基础算法
hdu 1015
Safecracker
DFS解法 ,简单明了
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):9327 AcceptedSubmission(s):4721ProblemDescription===Optechbriefing,2002/11/0206:42CST==="The
Lionel_D
·
2015-02-12 15:00
ACM
DFS
深搜
Safecracker
hdu1015
hdu 1015 -
Safecracker
题目:字母'A'~'Z'对应数值1~26,现在给你一个字母表和target,从里面选取5个字母v、w、x、y、z, 使得公式v-w^2+x^3-y^4+z^5=target成立,找到字典序最大的vwxyz。分析:简单题、搜索。因为一定选取5个元素,所以直接暴力即可(模拟递归)。说明:计算时标记取过的字母,避免重复计算。#include #include #include #include
mobius_strip
·
2015-01-31 21:00
hdu 1015
Safecracker
搜索
http://acm.hdu.edu.cn/showproblem.php?pid=1015#include #include #include usingnamespacestd; charzifu[2000],str[20],str1[20]; intmark[1000],k,num,flag; intcmp(constvoid*a,constvoid*b){ return*(char*)b-
wojiaohuangyu
·
2014-12-08 22:00
HDU(1015)____
Safecracker
ProblemDescription===Optechbriefing,2002/11/0206:42CST=== "TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,alongwithKleinandhisfactory,weredest
y1196645376
·
2014-11-19 15:00
搜索
C语言
hdu1015——
Safecracker
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):8718 AcceptedSubmission(s):4409ProblemDescription===Optechbriefing,2002/11/0206:42CST==="The
Guard_Mine
·
2014-09-29 22:00
HDU1015
Safecracker
【深搜】+【预处理】
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):7715 AcceptedSubmission(s):3871ProblemDescription===Optechbriefing,2002/11/0206:42CST==="The
u012846486
·
2014-04-22 14:00
hdu1015
HDOJ
Safecracker
很无聊的5重循环。。。。。Description===Optechbriefing,2002/11/0206:42CST=== "TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,alongwithKleinandhisfactory,we
u013013910
·
2014-01-28 20:00
编程
C语言
HDoj 搜索 (转)留着用
也就是穷举所有情况,一般看几个我们OJ的dfs的版本的题目就可以模仿着做了,因为牵涉到递归,初学者学的时候最好能举一反三,理解其中真谛.DFS---EASY(15) TempteroftheBone
Safecracker
u012590854
·
2013-12-09 21:00
hdu 1015
Safecracker
直接暴力水果,注意排序和手写pow函数#include #include #include #include usingnamespacestd; charstr[100]; charans[10]; inttop; intn; intlen; boolv[500]; intmypow(inta,intb) { ints=1; for(inti=1;i=0;i--) { if(v[str[i]])
t1019256391
·
2013-11-07 22:00
poj 1248
Safecracker
同样的理解题意很重要,我觉得可能这题作者的本意不是这么水,没那么简单可以暴力过的,但是我是暴力A了。。。网上有用回溯的,字典树的。。。也有5重暴力,反正我是懒得看,暴力我还是有自信自己写的,说不定写的还好一些。。哈哈我这个解法的亮点应该就是转换以后的sort(),这样算出来的一定是最大字典序的。。。一次A题意:给定一个长度为5……12个不同字符组成的字符串,从中选取5个,设为v,w,x,y,z,要
Scythe666
·
2013-10-24 21:00
HDU 1015
Safecracker
(算是很简单的dfs了,却debug了很久很久)
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):6663 AcceptedSubmission(s):3330ProblemDescription===Optechbriefing,2002/11/0206:42CST=== "Th
opm777
·
2013-09-10 10:00
DFS
HDOJ 搜索题(总共100题)
也就是穷举所有情况,一般看几个我们OJ的dfs的版本的题目就可以模仿着做了,因为牵涉到递归,初学者学的时候最好能举一反三,理解其中真谛.DFS---EASY(15) TempteroftheBone
Safecracker
opm777
·
2013-09-10 08:00
分类
HDU 1015
Safecracker
转载请注明出处:忆梦http://blog.csdn.net/fjy4328286/article/details/9460051题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1015题目大意:给你一个target数和一串字符串,这串字符都是A~Z,并且规定A~Z分别代表1~26。要求从这一串字符中找出5个字符(而且要是按字典序排序最大的)使得此公式
fjy4328286
·
2013-07-25 02:00
HDU1015
Safecracker
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):6326 AcceptedSubmission(s):3159Pro
lsh670660992
·
2013-07-21 10:00
HDOJ搜索题(总计100题)
也就是穷举所有情况,一般看几个我们OJ的dfs的版本的题目就可以模仿着做了,因为牵涉到递归,初学者学的时候最好能举一反三,理解其中真谛.DFS---EASY(15) TempteroftheBone
Safecracker
Ice_Crazy
·
2013-06-07 14:00
poj
Safecracker
/** C:
Safecracker
查看提交统计提问总时间限制:1000ms内存限制:65536kB 描述 "TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare
locusxt
·
2013-06-02 22:00
poj
cpp
HDOJ 1015
Safecracker
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1015DFS确定搜索变量为5个参数,然后进行深度优先搜索,并在深度为5时终止搜索,判断状态。预排序是为了获得字典序大的组合,判重。#include #include #include #include #include #include #include #include #include usingn
xiaozhuaixifu
·
2013-05-24 14:00
hdu 1015
Safecracker
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):5953 AcceptedSubmission(s):2963ProblemDescription===Optechbriefing,2002/11/0206:42CST==="The
u010228612
·
2013-05-11 00:00
c
HDOJ搜索题辑录I(总计100题)
也就是穷举所有情况,一般看几个我们OJ的dfs的版本的题目就可以模仿着做了,因为牵涉到递归,初学者学的时候最好能举一反三,理解其中真谛.DFS---EASY(15) TempteroftheBone
Safecracker
xindoo
·
2013-04-28 19:00
搜索
hdoj
HDU 1015
Safecracker
(深搜)
#include #include usingnamespacestd; constintmaxn=30+5; chars[maxn],l[maxn],r[maxn]; intlen,tar,sum,st; boolflag,vis[maxn]; voiddfs() { if(st<5) { for(inti=0;i
z690933166
·
2013-04-09 22:00
hdu 1015
Safecracker
就是一个组合数的方式#include #include #include #include usingnamespacestd; intlen; longlongm; stringstr; intp[22]; inttarg[10]; chartarg2[10]; boolvisited[22]; longlongpows(inta,intb) { longlongval=1; for(inti=
ygqwan
·
2013-03-26 18:00
Safecracker
(暴力)
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):5240 AcceptedSubmission(s):2622ProblemDescription===Optechbriefing,2002/11/0206:42CST==="The
cs_zlg
·
2013-02-07 00:00
hdu 1015
Safecracker
(枚举)
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):5180 AcceptedSubmission(s):2600ProblemDescription===Optechbriefing,2002/11/0206:42CST==="Theit
nealgavin
·
2013-01-26 19:00
hdu 1015
Safecracker
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1015SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4847 AcceptedSubmission(s):2427ProblemDes
hackerwin7
·
2012-10-15 22:00
Hdu 1015
Safecracker
SafecrackerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4797 AcceptedSubmission(s):2405ProblemDescription===Optechbriefing,2002/11/0206:42CST==="The
Magic____
·
2012-10-03 20:00
HDOJ 1015
Safecracker
用dfs解決這個題目暴力的方法解法http://my.oschina.net/dianpaopao/blog/75708#include #include #include intflag,vis[12]; intcmp(constvoid*a,constvoid*b){ return*(char*)b-*(char*)a; } intmult(char*ans){ intnu=0,x=1,
電泡泡
·
2012-08-30 21:00
HDOJ 1015
Safecracker
這個用的暴力搜索做的,也可以用dfs寫,送出http://my.oschina.net/dianpaopao/blog/75733本題題目意思理解了半天,大意是這樣的1)v-w^2+x^3-y^4+z^5=target 目的就是解決這個等式求出可能的vwxyz2)找出最大的字典序排列但是我的處理方法並不是這樣的1)對後一個字符串排序 按照由大到小2)找出最小的vwxyz的排列3)vwxyz對應不
電泡泡
·
2012-08-30 19:00
HDU 1015
Safecracker
(回溯)
===Optechbriefing,2002/11/0206:42CST=== "TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,alongwithKleinandhisfactory,weredestroyedinWorldWarII.
kisstears
·
2012-08-11 19:00
Integer
input
each
features
Numbers
combinations
hdu 1015
Safecracker
(暴力枚举,注意它要求按字典序最大的,所以开始要排序)
#include #include #include #include usingnamespacestd; intmain() { intn,i,j,k,l,m,sum,sum1,sum2,sum3,sum4,sum5,flag; charv,w,x,y,z; chardest[30],turn[30]; while(1) { flag=0; cin>>n>>dest; intxx=strlen
taotaotaotao910429
·
2012-07-30 18:00
Codeforces Problem 161E - Polycarpus the
Safecracker
先暴力打素数表,然后枚举5位数里(从高位到低位)有i位确定且为x的数有多少个。 具体解某个数时暴力即可#include #include #include #include usingnamespacestd; boolvis[100010]; vectordp[5][100010]; intk,l; inta[6][6]; intdfs(intnow){ inti,j,x=0,sum=0; fo
waitfor_
·
2012-03-23 23:00
POJ 1248
Safecracker
(我的水题之路——五重循环暴力- -!)
SafecrackerTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 1267 Accepted: 790Description"TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem
shiow1991
·
2012-01-28 18:00
POJ1248
Safecracker
暴力
题意:给一个密码值,给一串字符,挑出六个字符经过运算之后刚好为密码值。思路:很水很暴力。#include #include #definemax(a,b)(a>b?a:b) #definemin(a,b)(ab; } intcalc(intv,intw,intx,inty,intz) { returnv-w*w+x*x*x-y*y*y*y+z*z*z*z*z; } voidsolve() { fo
wuyanyi
·
2012-01-12 13:00
c
聊天
通讯
电话
hdoj 1015
Safecracker
见hdoj 1015 或 zoj 1403 或tzu 1308 我使用了枚举法,代码写的很罗嗦,可能还是深度优先搜索写起来更清晰。 /* hdoj 1015 */ #include <stdio.h> #include <string.h> #define MAX (12+5) #define RESLEN 5 int bub
codePrac
·
2011-07-21 13:00
rack
hdoj1015
Safecracker
(深度优先搜索)
ProblemDescription===Optechbriefing,2002/11/0206:42CST==="TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,alongwithKleinandhisfactory,weredestr
tonghu2010
·
2011-05-12 12:00
Integer
input
each
features
Numbers
combinations
Safecracker
ProblemDescription===Optechbriefing,2002/11/0206:42CST==="TheitemislockedinaKleinsafebehindapaintinginthesecond-floorlibrary.Kleinsafesareextremelyrare;mostofthem,alongwithKleinandhisfactory,weredestr
happymawolf
·
2010-12-01 19:00
String
Integer
input
features
Numbers
combinations
上一页
1
2
下一页
按字母分类:
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
其他