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
1038
PKU动态规划部分题目列表
1015 Jury Compromise1029 False coin1036 Gangsters1037 A decorative fence
1038
Bugs Integrated, Inc.1042
·
2015-11-12 22:21
动态规划
Bellman-Ford 算法及其优化
再次感谢原作者的分享:http://hi.baidu.com/jzlikewei/blog/item/94db7950f96f995a
1038
c2cd.html Bellman-Ford
·
2015-11-12 19:32
for
POJ 1185 炮兵阵地(状态压缩DP)
和 POJ
1038
类似,把行看成是一个整体,每一种摆放代表着一种状态,r-2, r-1 行的状态决定着 r 行的状态; 2.
·
2015-11-12 13:41
poj
POJ
1038
Bugs Integrated(状态压缩DP)
题意: 将 2*3 的芯片嵌入 n*m 的单位尺寸模板中,模板上面有一些坏点将被标记出,求最大的芯片数量。 黑书 138 页的例题, CEOI 2002; 思路: 1. 由于 m <= 10,所以可以针对每一行看成一个整体,根据情况来产生一个状态,首先肯定是枚举当前行的状态,来产生下一行的状态了,时间复杂度为O(nm3m); 2. 递推的过程中,因为是由一个已知状态,转移到多个未知
·
2015-11-12 13:41
integrate
[LOJ
1038
] Race to 1 Again
C - Race to 1 Again Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Description Rimi learned a new thi
·
2015-11-11 19:49
RAC
poj
1038
Bugs Integrated, Inc. 三进制状态压缩 DFS 滚动数组
把底边贴着第 x 行底边放置的芯片 称为第 x 行芯片。 由于芯片长度只有 3, 所以第 x 行芯片的放置只受 x-1行 和 x-2 行放置情况的影响。 同时由于一旦 方格 (x-1, y)被黑色记号或其他芯片 占据,则方格(x-2,y)即便空闲对第 x行芯片的放置也毫无意义。 所以,只需记录的状态只有: 一, a[x] = 0 表示方格(x-1,y)空
·
2015-11-11 17:17
integrate
acdream
1038
: nanae is a good girl 置换群-循环因子
解题思路: 对于置换群 分解其循环因子 对于 需要对换一次,对于 需要对换两次, 所以当前置换群最少对换次数为三 对于 本题, 我们先 求出其 循环因子后,再从小到大 进行贪心即可 解题代码: View Code #include<stdio.h>
·
2015-11-11 17:45
Go
DP 练习中。。。
1015 Jury Compromise1029 False coin1036 Gangsters1037 A decorative fence
1038
Bugs Integrated,
·
2015-11-11 13:48
dp
详解C#的数学类,Math,浮点数(中)
值的范围是从 -3.402823*
1038
到3.402823*
1038
大于0的最小float值是1.401298*10-45这三个值分别对应的是 flo
·
2015-11-11 12:07
Math
SGU132 - Another Chocolate Maniac(状态压缩DP)
题目大意 给定一个N*M大小的大小的蛋糕,蛋糕的有些地方已经放置了东西,要求你在蛋糕上放入尽量少的1*2大小的巧克力,使得蛋糕不能够再放入巧克力 题解 和POJ
1038
恰好相反,此题是放入尽量少的巧克力
·
2015-11-11 12:44
man
POJ
1038
- Bugs Integrated, Inc.(状态压缩DP)
题目大意 要求你在N*M大小的主板上嵌入2*3大小的芯片,不能够在损坏的格子放置,问最多能够嵌入多少块芯片? 题解 妈蛋,这道题折腾了好久,黑书上的讲解看了好几遍才稍微有点眉目(智商捉急),接着看了网上大牛的解题报告和实现代码才弄明白怎么用三进制来进行状态压缩,关键就是理解能够横着放置和竖着放置的条件。由于竖着放置会受到前面两行的影响,这样我们就可以用三进制来表示前面两行的状态了,然后根据前面
·
2015-11-11 12:43
integrate
【POJ】
1038
Bugs Integrated, Inc.
1 #include<cstdio> 2 #include<cstring> 3 #include<vector> 4 #include<algorithm> 5 #define MAXN 160 6 #define MAXM 20 7 #define MAXL 280 8 using namespace
·
2015-11-11 07:30
integrate
2010.12.14 关于decimal和Numeric类型
您可以用2 到17 个字节来存储从-
1038
-1 到
1038
-1 之间的数值(这句话不
·
2015-11-11 04:09
类型
hihocoder
1038
01背包
hihocoder
1038
01背包 时间限制:20000ms 单点时限:1000ms 内存限制:256MB 描述 且说上一周的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券
·
2015-11-11 00:42
code
BZOJ
1038
瞭望塔(半平面交)
id=
1038
题意:给出一条折线,在折线上选择一点在这点放一个竖直的杆使得杆顶能够看到折线上每个点。在这个前提下使得杆的高度最小? 思路:从折线的相邻两个点作直线。
·
2015-11-09 14:59
ZOJ
IPv6互联网协议 (转帖)
现有标准IPv4只支持大概40亿(4×109)个网络地址,而IPv6支持3.4 ×
1038
个,这等价于在地球上每平方英寸有4.3×1020地址(6.7×1017
·
2015-11-09 13:17
互联网
hdu
1038
pid=
1038
简单题,关键是读懂题; View Code #include " iostream " #
·
2015-11-08 17:22
HDU
西电oj
1038
状压dp
西电oj
1038
状压dp
1038
: 裁玻璃 时间限制: 1 Sec 内存限制: 128 MB 提交: 33
·
2015-11-08 16:19
dp
PAT
1038
. Recover the Smallest Number
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> using namespace std; bool mycmp(const string& a, const string& b) { string t
·
2015-11-08 12:32
number
hihoCoder#
1038
01背包
原题地址 基本动态规划 代码: 1 #include <iostream> 2 3 using namespace std; 4 5 int main() { 6 int N, M; 7 int score[100010]; 8 int need[512]; 9 int val
·
2015-11-08 10:28
code
Hdu 4267 A Simple Problem with Integers
(Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
1038
&
·
2015-11-07 15:18
Integer
一元三次方程 (codevs
1038
)题解
【问题描述】 有形如:ax3+bx2+cx+d=0这样的一个一元三次方程。给出该方程中各项的系数(a,b,c,d均为实数),并约定该方程存在三个不同实根(根的范围在-100至100之间),且根与根之差的绝对值>=1。要求由小到大依次在同一行输出这三个实根(根与根之间留有空格),并精确到小数点后2位。提示:记方程f(x)=0,若存在2个数x1和x2,且
·
2015-11-07 10:27
code
1038
: [ZJOI2008]瞭望塔 - BZOJ
Description致力于建设全国示范和谐小村庄的H村村长dadzhi,决定在村中建立一个瞭望塔,以此加强村中的治安。我们将H村抽象为一维的轮廓。如下图所示 我们可以用一条山的上方轮廓折线(x1, y1), (x2, y2), …. (xn, yn)来描述H村的形状,这里x1 < x2 < …< xn。瞭望塔可以建造在[x1, xn]间的任意位置, 但必须满足从瞭望塔的顶端可以
·
2015-11-02 12:50
2008
cocos2d-x 显示中文字符和解析XML文件
源地址:http://codingnow.cn/cocos2d-x/
1038
.html 在cocos2d-x中直接显示中文的时候会出现乱码,虽然在实际开发中把字符串直接写在代码里也不是好的做法,但是有时候也是为了更方便了
·
2015-11-01 14:04
cocos2d-x
hihoCoder #
1038
: 01背包
思路:直接 DP解的,方式固定。 1 #include <iostream> 2 #include <stdio.h> 3 #include <cstring> 4 #include <string> 5 using namespace std; 6 7
·
2015-11-01 13:53
code
hihoCoder #
1038
01背包
#
1038
: 01背包 Time Limit:20000ms Case Time Limit:1000ms Memory Limit:256MB 描述 且说上一周的故事里,
·
2015-11-01 08:15
code
HDU 3336 Count the string(KMP)
32768/32768 K (Java/Others)Total Submission(s): 2191 Accepted Submission(s):
1038
·
2015-10-31 18:42
String
PAT
1038
. Recover the Smallest Number
#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<queue> #include<vector> #include<cmath> #include<iomanip> #inclu
·
2015-10-31 15:26
number
MySQL出错代码列表
1024:读文件错误 1025:更改名字时发生错误 1026:写文件错误 1032:记录不存在 1036:数据表是只读的,不能对它进行修改 1037:系统内存不足,请重启数据库或重启服务器
1038
:用于排序的内存不足
·
2015-10-31 12:17
mysql
C# 多线程
pid=
1038
关键字:多线程-线程同步 描述:关于.net中线程的基本应用可以参考《C#3.0核心技术》中多线程的第一部分,但线程同步方面的最好参考仍然是Jeffrey的《Windows
·
2015-10-31 11:44
多线程
HDU
1038
Biker's Trip Odometer(简单的水题)
Biker's Trip Odometer Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2098 Accepted Submission(s): 1
·
2015-10-31 10:24
dom
[POJ
1038
]状压DP
题意:给一个n*m的区域,里面有一些障碍物,往里面放2*3和3*2的矩形,矩形之间不能重叠,不能覆盖到障碍物,求能放置的最大个数。(n<=150,m<=10) 思路:看到m=10就应该往状压dp方面想了。由于有3*2的矩形,所以需要记录2行的状态,粗略估计状态数高达150*2^20=1.5*1e8,这么多状态必然超时,注意到如果(i-1,j)为0了,无论(i,j)为1或0,(i,j)
·
2015-10-31 10:35
poj
pku动态规划题目列表
/2007/08/26/30848.aspx 1015 Jury Compromise 1029 False coin 1036 Gangsters 1037 A decorative fence
1038
·
2015-10-31 09:58
动态规划
【ZJOI2008】【BZOJ
1038
】瞭望塔
Description致力于建设全国示范和谐小村庄的H村村长dadzhi,决定在村中建立一个瞭望塔,以此加强村中的治安。我们将H村抽象为一维的轮廓。如下图所示我们可以用一条山的上方轮廓折线(x1,y1),(x2,y2),….(xn,yn)来描述H村的形状,这里x1#include#include#include#include#defineMAXN1010usingnamespacestd;int
CreationAugust
·
2015-10-30 19:16
随便搞搞
模板题库
【ZJOI2008】【BZOJ
1038
】瞭望塔
Description致力于建设全国示范和谐小村庄的H村村长dadzhi,决定在村中建立一个瞭望塔,以此加强村中的治安。我们将H村抽象为一维的轮廓。如下图所示我们可以用一条山的上方轮廓折线(x1,y1),(x2,y2),….(xn,yn)来描述H村的形状,这里x1 #include #include #include #include #defineMAXN1010 usingnamespaces
CreationAugust
·
2015-10-30 19:00
半平面交
vijos
1038
括号+路径 ***
链接:点我 就是自己写不出来 1 #include <cstdio> 2 #include <climits> 3 #include <memory.h> 4 using namespace std; 5 const int MAX = 23; 6 7 int dp[MAX][MAX]; 8 int pos[
·
2015-10-30 14:19
OS
URAL
1038
Spell Checker
这个题目可以用有限自动机的理论去做,也可以在设定好各个状态后枚举可能的情况并跳转状态,比如句子已经结束这个状态设为0,处于单词中这个状态设为1,在句子中间非单词部分时这个状态设为2,这样如果处于状态0但是遇到了小写字母就算是一个错误,处于状态1但遇到了大写字母也算是一个错误。 #include<
·
2015-10-30 13:02
check
tyvj:
1038
忠诚 线段树
tyvj:
1038
忠诚 Time Limit: 1 Sec Memory Limit: 131072KiB Submit: 9619 Solved
·
2015-10-30 13:21
线段树
【Tyvj
1038
】忠诚 线段树
题目描述 老管家是一个聪明能干的人。他为财主工作了整整10年,财主为了让自已账目更加清楚。要求管家每天记k次账,由于管家聪明能干,因而管家总是让财主十分满意。但是由于一些人的挑拨,财主还是对管家产生了怀疑。于是他决定用一种特别的方法来判断管家的忠诚,他把每次的账目按1,2,3…编号,然后不定时的问管家问题,问题是这样的:在a到b号账中最少的一笔是多少?为了让管家没时间作假他总是一次问多个问题。
·
2015-10-30 11:38
线段树
POJ
1038
Bug Integrated Inc(状态压缩DP)
Description Bugs Integrated, Inc. is a major manufacturer of advanced memory chips. They are launching production of a new six terabyte Q-RAM chip. Each chip consists of six unit squares arranged in
·
2015-10-30 11:42
integrate
1038
. Recover the Smallest Number
1038
.RecovertheSmallestNumber(30)时间限制400ms内存限制65536kB代码长度限制16000B判题程序Standard作者CHEN,YueGivenacollectionofnumbersegments
caicai_zju
·
2015-10-28 15:00
HLG
1038
菜鸟和大牛 递推
菜鸟和大牛TimeLimit:1000MSMemoryLimit:65536KTotalSubmit:952(371users)TotalAccepted:459(346users)Rating: SpecialJudge: NoDescriptionblue和AutoGerk是好朋友。他们的相同点是都喜欢研究算法,不同点是AutoGerk已是大牛而blue还是菜鸟。blue经常拿一些自以为很难的
zp___waj
·
2015-10-28 12:00
C++
loj
1038
(dp求期望)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=25915 题意:求一个数不断地除以他的因子,直到变成1的时候 除的次数的期望。 思路:设一个数的约数有num个,E[n] = (E[a[1]]+1)/num+(E[a[2]]+1)/num+...+(E[a[num]]+1)/num+1 ,而a[num
·
2015-10-28 07:31
dp
1038
. Recover the Smallest Number (30)
1038
.RecovertheSmallestNumber(30)Givenacollectionofnumbersegments,youaresupposedtorecoverthesmallestnumberfromthem.Forexample
qq_26437925
·
2015-10-22 09:00
poj
1038
题目大意:网络导航? 标准的web浏览器包含向前和向后浏览最近的页面的特性,有一个方法来实现这些用两个栈来跟踪页面达到向前和向后的移动,在这个问题里面,你被要求实现这些。 以下命令需要支持: BACK:把当前页面放进前面的栈的最顶部,删除这个页面在后面的栈,使其成为新的当前页面,如果后面的栈是空格,命令被忽略; FORWARD:跟上面的相反 ; VIS
·
2015-10-21 12:26
poj
物理数据库设计 - 理解浮点数
在这里首先来介绍下SQLServer中的浮点数: 浮点类型 是否精确 说明 decimal 精确数值型 -
1038
次方+1~
1038
-1的固
·
2015-10-21 12:00
数据库设计
九度OJ
1038
:Sum of Factorials(阶乘的和) (DP、递归)
时间限制:1秒内存限制:32兆特殊判题:否提交:1845解决:780题目描述: JohnvonNeumann,b.Dec.28,1903,d.Feb.8,1957,wasaHungarian-Americanmathematicianwhomadeimportantcontributionstothefoundationsofmathematics,logic,quantumphysics,m
thudaliangrx
·
2015-10-18 17:00
dp
递归
C语言
OJ
九度
# hihicoder #
1038
: 01背包
hihicoder#
1038
:01背包标签(空格分隔):hihocoder经典的01背包问题。
wgdzz
·
2015-09-29 15:00
动态规划
PAT
1038
统计同成绩学生
本题要求读入N名学生的成绩,将获得某一给定分数的学生人数输出。输入格式:输入在第1行给出不超过105的正整数N,即学生总人数。随后1行给出N名学生的百分制整数成绩,中间以空格分隔。最后1行给出要查询的分数个数K(不超过N的正整数),随后是K个分数,中间以空格分隔。输出格式:在一行中按查询顺序给出得分等于指定分数的学生人数,中间以空格分隔,但行末不得有多余空格。输入样例:10607590557599
baidu_17313961
·
2015-09-24 14:00
C++
pat
UVA - 10905 Children's Game
V_judge上的题目 UVA-10905Children'sGame与PAT
1038
是一样的题目,或者说
1038
要稍微麻烦一点点,题解也可以通用,看到了就顺便做一下。
sinat_29278271
·
2015-09-19 09:00
排序
贪心
上一页
8
9
10
11
12
13
14
15
下一页
按字母分类:
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
其他