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
1426
HDOJ Sudoku Killer
1426
【DFS】
SudokuKillerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4880 AcceptedSubmission(s):1569ProblemDescription自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们
ydd97
·
2015-06-23 22:00
POJ
1426
Find The Multiple(dfs)
Description给出一个整数n,求出任意一个它的倍数m,要求m必须只由十进制的’0’或’1’组成Input多组用例,每组一个整数n(1 #include usingnamespacestd; intn; longlongbfs() { queuep; while(!p.empty()) p.pop(); p.push(1);//从第一位开始确定 while(1) { longlongnum=
V5ZSQ
·
2015-06-21 21:00
【BZOJ
1426
】收集邮票 概率DP 论文题 推公式题
链接:#include intmain() { puts("转载请注明出处[辗转山河弋流歌by空灰冰魂]谢谢"); puts("网址:blog.csdn.net/vmurder/article/details/46468557"); }题解:并没有什么卵用,首先有一个神思路,然后神推公式。下面这篇博客写得很详尽、、另外题意是买第i次花i元,不是标号为i的邮票花i元。=a800”>http://bl
Vmurder
·
2015-06-12 10:00
概率DP
收集邮票
BZOJ1426
Sudoku Killer
SudokuKillerTimeLimit:1000MS MemoryLimit:32768KB 64bitIOFormat:%I64d&%I64uSubmit Status Practice HDU
1426
Appointdescription
w144215160044
·
2015-06-02 16:00
POJ -
1426
- Find The Multiple (DFS)
题目传送:FindTheMultiple思路:DFSAC代码:#include #include #include #include #include #include #include #include #include #include #include #include #include #include #defineLLlonglong #defineULLunsignedlonglon
u014355480
·
2015-05-25 00:00
ACM
poj
DFS
POJ
1426
Find The Multiple
FindTheMultipleTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 20297 Accepted: 8236 SpecialJudgeDescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresent
wust_ZJX
·
2015-05-16 22:00
poj
1426
(bfs dfs)
输入一个整数,求大于等于这个整数的且满足条件的最小值,条件是这个整数能整出输入的整数,且这个整数只能包括0和1解题思路:看了有些大神做法,取模神马的好复杂,其实可以直接从前往后两个方向的深搜就可以搜到。后记:做后面题,发现一旦情况比较多,就会TLE,自己判断时间复杂度的能力也弱,所以以后这种题就广搜:求满足某种条件下的最优情况。#include #include longlongn,DEP; lo
yexiaohhjk
·
2015-05-15 10:00
搜索
DFS
E_Find The Multiple(POJ_
1426
)
DescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresentationcontainsonlythedigits0and1.Youmayassumethatnisnotgreaterthan200andthereisacorrespondingmcontaining
highmath_Final
·
2015-05-14 20:00
POJ
1426
Find The Multiple (广搜)
FindTheMultipleTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 20235 Accepted: 8203 SpecialJudgeDescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresent
u013068502
·
2015-05-06 22:00
poj
poj
1426
Find The Multiple
DescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresentationcontainsonlythedigits0and1.Youmayassumethatnisnotgreaterthan200andthereisacorrespondingmcontaining
Kirito_Acmer
·
2015-05-04 14:00
搜索
Find The Multiple--POJ
1426
Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than
·
2015-04-29 14:00
find
poj
1426
Find The Multiple special judge BFS or Doubi mode
E-FindTheMultipleTimeLimit:1000MS MemoryLimit:10000KB 64bitIOFormat:%I64d&%I64uSubmitStatusPracticePOJ
1426
DescriptionGivenapositiveintegern
wr132
·
2015-04-25 10:00
find
poj
multiple
bfs
special
the
打表
judge
1426
HDU
1426
--Sudoku Killer【DFS】
SudokuKillerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4724 AcceptedSubmission(s):1529ProblemDescription自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们
hpuhjh
·
2015-04-24 20:00
POJ
1426
Find The Multiple BFS
题目大意:给你一个十进制整数n,让你找出n的十进制倍数m,使m满足每位上的数字只能是0或1。如果存在多个,那么就任意输出一个。分析:m和n的范围不太大,首先想到的就是暴力=_=!暴力过程中发现需要同时记录两个结果:当前数cnt乘10之后加0和加1,因为要分别在这两种情况之后考虑后面的情况,后面类推也是如此,感觉像是一层一层的往外搜索---BFS。实现代码如下:#include #include u
AC_Gibson
·
2015-04-14 16:00
Sudoku Killer(数独DFS+恶心的输入输出!!!)
pid=
1426
SudokuKillerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission
Enjoying_Science
·
2015-04-02 20:00
算法
ACM
DFS
【位运算DFS/DLX】【HDU
1426
】【数独】
题意:标准的一道数独题DFS做法:将横纵九宫格里的数字用位运算状态压缩,且可以通过逻辑或来确定总共有哪些数字被选择了,很方便也很快,代码如下#include #include #include #include #include #include #include #include #include #defineoo0x13131313 usingnamespacestd; charMAP[30
zy691357966
·
2015-03-30 19:00
Find The Multiple
FindTheMultipleTimeLimit:1000MS MemoryLimit:10000KB 64bitIOFormat:%I64d&%I64uSubmit Status Practice POJ
1426
DescriptionGivenapositiveintegern
Ash_Zheng
·
2015-03-30 14:00
poj
1426
bfs+同余模定理
id=
1426
思路:用bfs搜索每一个位数,都只能是0或1,但是搜索到后面会出现大数问题,然后就去学习了下同余模定理。。
liujc_
·
2015-03-26 11:00
查看Linux服务器内存使用情况
total used free shared buffers cachedMem: 32108 30681
1426
birdinroom
·
2015-01-08 14:54
linux
内存
服务器
shared
查看Linux服务器内存使用情况
total used free shared buffers cachedMem: 32108 30681
1426
birdinroom
·
2015-01-08 14:54
linux
内存
服务器
shared
va_list的原理及用法
va_list原理及用法分类: 编程2010-10-2011:22
1426
人阅读 评论(1) 收藏 举报list编译器平台语言x86编程 VA_LIST是在C语言中解决变参问题的一组宏,
JT504265034
·
2014-12-01 09:47
return
C语言
include
编译器
HDU -
1426
Sudoku Killer(回溯)
数独问题,今天蓝桥杯校赛没把这题做出来,和学长聊了一下,可能是我对于回溯的理解不够深入。所以今晚补了一下数独的代码。解析:这题和八皇后问题相似,可以开一个3数组,分别标记该行用了什么数字,该列用了什么数字,和该方块用了什么数字,如果遇到标记过了数字,就跳过。总结:这是省赛前的最后一题,复习一下回溯,祝愿我明天省赛好运。#include #include #include #include usin
HelloWorld10086
·
2014-11-29 23:00
sudoku
HDU
killer
1426
poj
1426
--Find The Multiple(广搜,智商题)
FindTheMultipleTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 18527 Accepted: 7490 SpecialJudgeDescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresent
u013015642
·
2014-10-16 19:00
JavaScript博客整理
1965677 为什么不努力的博客,里面有JavaScript以及浏览器对象都有详细的描述(读完一遍了)2、http://www.nowamagic.net/librarys/veda/detail/
1426
GregOfNeu
·
2014-09-16 00:00
JavaScript
博客
UVA -
1426
Discrete Square Roots (模方程)
DescriptionAsquarerootofanumberxisanumberrsuchthatr2=x.Adiscretesquarerootofanon-negativeintegerxisanon-negativeintegerrsuchthatr2xmodN,0r(r+r1)*(r-r1)=k3*n那么我们假设A*B=n,我们就可以得到::r+r1≡0(modA),:r-r1≡0(mo
u011345136
·
2014-08-25 21:00
poj
1426
Find The Multiple (bfs 搜索)
FindTheMultipleTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 18012 Accepted: 7297 SpecialJudgeDescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresent
u014253173
·
2014-08-07 16:00
搜索
ACM
poj
bfs
POJ
1426
Find The Multiple (搜索)
题目类型 搜索题题目意思找一个只由数字0或1构成的数字要求这个数字可以被n整除(1M来保存这个枚举的数即M[i]因为如果某个数x%n==y的话再遇到%n==y的数的话这个数和x是等价的因为前面部分%n==y后面部分如果两个都往下枚举的话modn肯定也是相等的 当我们枚举到一个数这个数modn==0的话即表示这个数是合法的测试发现要用longlong才能保存下某些输入数据的答案参考代码 -有疑问的地
Yunyouxi
·
2014-07-28 21:00
搜索
暑假训练1-搜索专题
,hash判重,双向广搜,A*)专题训练入口-> 搜索专题搜索专题训练解题报告:A-POJ2488ChildrenoftheCandyCornB-POJ2531NetworkSaboteurC-POJ
1426
FindTheMultipleD-POJ1724ROADSE-POJ341
Yunyouxi
·
2014-07-28 16:00
搜索
poj-
1426
//596K32MSG++ #include #include #include #include usingnamespacestd; #defineMAX145 #defineMAX_R100000 structBFSNode{ intdigitCapacity; intreminderArraySize; intreminderArray[MAX1];//mod100000when
fyfcauc
·
2014-07-21 20:00
poj
图论
POJ
1426
用队列会TLE#include#include#includeusingnamespacestd;intn;longlongint ans;longlongintnum[10000000];longlongint bfs(){ inttop=0,tail=0; num[tail++]=1; longlongint now,temp; while(top
u013570474
·
2014-07-21 07:00
uva
1426
- Discrete Square Roots(拓展欧几里得)
题目链接:uva
1426
-DiscreteSquareRoots题目大意:给出X,N,R,求出所有满足的r,使得r2≡x%N,并且R是一个其中的解。
u011328934
·
2014-07-04 22:00
ACM-DFS之Sudoku Killer——hdu
1426
pid=
1426
ProblemDescription自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。
lx417147512
·
2014-04-19 18:00
sudoku
ACM
DFS
killer
hdu1426
DLX题集
FZU 1686神龙的难题HDU
1426
Sudoku KillerHDU1530Maximum Clique HDU1603A Puzzling ProblemHDU2119MatrixHDU2295RadarHDU2518DominoesHDU2780
yew1eb
·
2014-04-08 09:00
POJ
1426
Find The Multiple
题目链接~~>做题感悟:做了杭电上的两个题目,再做这个真是so easy!但是还要写一下的,用第二种方法很不熟练。。。解题思路:还是用取余的思想,每次都将余数乘10再加上相应的数,0要特判一下。代码1:#include #include #include #include #include #include usingnamespacestd; intn; boolvis[300];//标记余数是
u011074149
·
2013-12-20 09:00
poj
1426
bfs+同余数定理
题意大致是给定一个n(1~200),求出n的一个倍数k,但k的每一位都必须是0或1。SpecialJudge的意思是答案不唯一,比如说n=2时,k=10对,k=100也对,只要输出一个符合要求的即可,没有说要最小。这个题有点像数学题,但还用到了bfs,还算比较综合吧。难点在于k比较大的时候如何表示,很显然一个int,long都是不行的。还有就是数很大时穷举去计算是否能整除也很浪费时间。解决的办法是
u011613729
·
2013-09-08 10:00
C++
数学
ACM
poj
bfs
HDU
1426
Sudoku Killer
SudokuKillerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):3144 AcceptedSubmission(s):991Problem
lsh670660992
·
2013-07-22 22:00
C++
搜索
DFS
深度优先搜索
判重
hdu
1426
数独
pid=
1426
#include #include #include #defineINF0x3f3f3f3f #defineBUGprintf("here!
JustSteps
·
2013-07-13 12:00
poj
1426
Find The Multiple
FindTheMultipleTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 14622 Accepted: 5938 SpecialJudgeDescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresent
u010422038
·
2013-07-02 11:00
find
the
poj1426
Mul
卸载中软防水墙软件
http://hi.baidu.com/lnhndx/item/cf8f
1426
c0051e0a43634af7卸载中软防水墙软件我这里所谓的卸载就是使得它不能运行步骤如下:1.新建c:\a.bat批处理
cay22
·
2013-05-22 11:00
UESTC
1426
Boring Ranking
BoringRankingTimeLimit: 1000MS MemoryLimit: 65536KB 64bitIOFormat: %lld&%lluDescriptionNewtermiscoming,sotheannualscholarshipisgoingtobedistributed.ButAlibabacan’twaittoknowhowmuchhecanget.Nowhegetsal
·
2013-05-09 21:00
rank
POJ
1426
—— Find The Multiple
描述 Givenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresentationcontainsonlythedigits0and1.Youmayassumethatnisnotgreaterthan200andthereisacorrespondingmcontainingnomoreth
wuxinliulei
·
2013-03-22 23:00
数论
10个你必须知道的jQueryMobile代码片段
原创文章,转载请注明: 转载自http://www.yiiyaa.net/ 本文链接地址: http://www.yiiyaa.net/
1426
0、jQuery Mobile生命周期函数必须在
kenkao
·
2013-03-12 10:00
jquerymobile
吴昊品游戏核心算法 Round 2 —— 吴昊教你玩数独AI(DFS)(HDOJ
1426
)
Round2之后,我会给出一些棋类游戏的模拟算法或者是AI算法。以下节选自百度百科(翻阅文史性质的文献资料,我认为维基百科更加靠谱,原因,你懂的,但是,我认为翻阅学术文献资料,百度百科更加靠谱,或者说,描述地更加完备一些) 数独(すうどく,Sudoku)是一种运用纸、笔进行演算的逻辑游戏。玩家需要根据9×9盘面上的已知数字,推理出所有剩余空格的数字,并满足每一行、每一列、每一个粗线宫内的数字均含
·
2013-02-27 20:00
round
寒假前刷题(5)搜索系列 bfs poj
1426
FindTheMultipleTimeLimit:1000MS MemoryLimit:10000KTotalSubmissions:13192 Accepted:5389 SpecialJudgeDescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemofnwhosedecimalrepresentatio
hange_db
·
2012-12-10 22:00
poj
1426
http://poj.org/problem?id=
1426
//思路:一位一位的扩展,如果满足ans%n==0直接返回 #include #include #include usingnamespacestd; longlongans; intn; voidBFS() { queueq; q.push(1); while(!q.empty()) { ans=q.front(); q.pop(); if(ans%n==0) r
wahaha1_
·
2012-11-29 19:00
POJ
1426
Find The Multiple
暴力求解,本地打表。#include #include #include usingnamespacestd; unsignedlonglongans[300]={0,1, 10, 10000000000000000011, 100, 10, 10000000000000000110, 10000000000000000011, 1000, 10000000000011111111, 10, 1
sssogs
·
2012-11-23 23:00
i++与++i的区别与性能差异
下文摘自http://www.gracecode.com/Archive/Display/
1426
总而言之,i++;是一个右值,而++i是一个左值。加深印象,上述的两条语句可以用下面两个函数表示。
wxl1986622
·
2012-11-22 18:00
ZOJ
1426
POJ 1693 Counting Rectangles
本来以为是神题,看了一眼别人的题解,大致了解了伪水题的本质,本着蒙一蒙的思想写了个巨屎的代码,竟然1Y了,想来里面的理论自己都没好好证明白-- 看小媛姐的分类才写的题,注解里写着:给100条线段,求相交成矩形的个数。读了读题,线段是水平或垂直的。根据从小学奥数中走出来的经验,似乎跟神马组合数学有关系罢、、今天看了某神的题解,我了个去,四条线段交出一个矩形,每一个矩形都是由四条线段交出来的啊!!!而
zzxyyx_1
·
2012-10-29 21:00
POJ
1426
Find The Multiple
题目大意:找出一个10进制数,但是只含1或者0的数能够整除n的数。n最大为200,结果最大为100位以内的数(其实这是骗局)。思路:先dfsACprogram:#include #include #include #include #include usingnamespacestd; intflag; voiddfs(longlongt,intn,intk) { if(flag==1)retur
kg_second
·
2012-10-21 17:00
System
poj
1426
题意:求解一个数n的倍数且这个数只有0与1两个数字组成。思路:开始的时候想着做搜索题,上网搜了一下,说这个是,但是最后做的时候感觉跟搜索关系不是很大,直接进行计算就行。可悲的是用C++直接TLE了,后来看了一下discuss,第一个的做法跟我差不多,他的竟然过了。然后我改改少了一个判断,但是还是TLE。果断的换了语言提交试试,G++竟然神奇的过了,虽然时间也很多,四百多。(网上说有优化的方法,把模
sdjzujxc
·
2012-10-21 14:00
c
优化
语言
上一页
2
3
4
5
6
7
8
9
下一页
按字母分类:
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
其他