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
1018
bzoj
1018
堵塞的交通|线段树维护连通性
很久之前听泽神说过这道题,今天终于下定决心写了维护两个横,两个竖,两个斜的连通性h[2],s[2],x[2]。转移如下表(a为左子树,b为右子树,t为目标子树) 查询时要考虑绕了一圈的情况,即[1,l][l,r][r,n]三个区间的连通性最后竟然是close的时候把边赋成了11018:[SHOI2008]堵塞的交通trafficTimeLimit:3Sec MemoryLimit:162MBSu
heheda_is_an_OIer
·
2015-11-16 10:00
HDU分类
,最近点对问题,用分治1008简单题1009贪心1010搜索题,剪枝很关键1011 1012简单题1013简单题(有个小陷阱)1014简单题1015可以看作搜索题吧1016经典的搜索1017简单数学题
1018
sinat_19628145
·
2015-11-14 15:00
codeforces #275 div2题解
,c不互质 的情况;其中l<=a<b<c<=r;如果存在,就输出a,b,c;不存在就输出-1; 其中(1 ≤ l ≤ r ≤
1018
·
2015-11-13 22:41
codeforces
[置顶] 基于stm32f103zet6之UC/OS_II的学习1(初步移植OS--点灯大法)
(代码移植参照着ST官方源代码) 也就是资源里面名为 取AN-
1018
.pdf的文档。 代码这里可以下载htt
·
2015-11-13 20:52
stm32
有关vtun和虚拟网卡要做的实验
前期配置http://bbs.chinaunix.net/thread-3768139-1-1.html 1、根据文章http://blog.csdn.net/wangxing
1018
/article
·
2015-11-13 19:54
网卡
BZOJ
1018
线段树维护连通性
这个题我总是想用循环完成转移,最后发现,还是手工枚举最靠谱~ 建立线段树,线段树的每个节点(代表的是区间)维护以上六个值,true表示连通,false表示不连通,具体可以看我的代码~ View Code 1 #include <iostream> 2 #include <cstdio> 3 #include <cstr
·
2015-11-13 14:33
线段树
POJ
1018
【枚举+剪枝】.cpp
题意: 给出n个工厂的产品参数带宽b和价格p,在这n个工厂里分别选1件产品共n件,使B/P最小,其中B表示n件产品中最小的b值,P表示n件产品p值的和。 输入 iCase n 表示iCase个样例n个工厂 m1 p1 b1 p2 b2..pm1 bm1 //第一个工厂有m1个同种类不同参数的产品,每一个产品的参数分别是p1 b1 p2 b2 m2 p1 b1 p2
·
2015-11-13 13:21
poj
MySQL GRANT REVOKE用法
原文地址:http://chenling
1018
.blog.163.com/blog/static/14802542010320112355598 MySQL的权限系统围绕着两个概念:
·
2015-11-13 13:15
mysql
【wikioi】
1018
单词接龙
题目链接 算法:DFS+考你阅题 题目描述: 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合部分合为一部分,例如beast和astonish,如果接成一条龙则变为beastonish,另外相邻的两部分不能存在包含关系,例如at和atide间不能
·
2015-11-13 11:27
IO
【BZOJ】
1018
: [SHOI2008]堵塞的交通traffic
id=
1018
题意:有2行,每行有c(c<=100000)个城市,则一共有c-1个格子,现在有q(q<=100000)个操作,操作Open和Close是将格子的四个角相邻的城市连边或删边
·
2015-11-13 11:43
2008
九度OnlineJudge之
1018
:统计同成绩学生人数
题目描述: 读入N名学生的成绩,将获得某一给定分数的学生人数输出。 输入: &n
·
2015-11-13 09:10
online
1018
-深度遍历二叉树
描述 二叉树(binary tree)是非常重要的树形数据结构,它是结点的有限集合,该集合或者为空集,或者是由一个根和两个互不相交的、称为该根的左子树和右子树的二叉树组成。 一般意义上,遍历(traverse)一棵二叉树意味着对该二叉树中的每个结点访问且仅访问一次。 (1)若二叉树不为空,先序遍历是指先访问该树根结点,再访问先序遍历左子树,最后先序遍历右子树。 (2)若二叉
·
2015-11-13 08:16
二叉树
POJ
1018
-Communication System
转载请注明出处:優YoU http://blog.csdn.net/lyy289065406/article/details/6676781 大致题意: 某公司要建立一套通信系统,该通信系统需要n种设备,而每种设备分别可以有m1、m2、m3、...、mn个厂家提供生产,而每个厂家生产的同种设备都会存在两个方面的差别:带宽bandwidths 和 价格prices。 现在每种设备都各
·
2015-11-13 07:18
System
ural
1018
(树形dp)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=17662 题意:给一棵边有权值的二叉树,节点编号为1~n,1是根节点。求砍掉一些边,只保留q条边,这q条边构成的子树的根节点要求是1,求这颗子树的最大权值。 分析:1.dp[u][i]表示已以u为根节点的子树,保留了i个节点的最大权值。每条边的权值
·
2015-11-13 07:51
dp
URAL
1018
(金典树形DP)
连接:
1018
.
·
2015-11-13 07:47
dp
ural
1018
Binary Apple Tree(树形dp | 经典)
----------------------------------------------------------------------- 题目链接: url-
1018
·
2015-11-13 04:55
binary
POJ 动态规划题目列表
※最近更新:Poj斜率优化题目 1180,2018,3709 列表一:经典题目题号:容易:
1018
, 1050, 1083, 1088,
·
2015-11-13 04:54
动态规划
BZOJ
1018
program bzoj
1018
; type node=array [0..5] of boolean; pair=array [0..1] of boolean; var tot
·
2015-11-13 04:12
ZOJ
hdu
1018
求大数阶乘位数有公式
位数的计算方法是(int)log10(x)+1 这个是计算x的位数的log10(n!)=log10(1)+log10(2)+log10(3)+...+log10(n) #include<stdio.h>#include<math.h>int main() { int n,t; double sum; scanf("%d",&
·
2015-11-13 03:11
HDU
[HDOJ]
1018
. Big Number
恩,简单的数学题目。 简单推导如下: log10(n!) = log10(n*n-1*n-2......*2*1) = log10(n) + log10(n-1) + log10(n-2) + ...... + log10(2) + log10(1) log10(100
·
2015-11-13 02:58
number
POJ 题目列表(DP)
/qijinbiao/archive/2011/09/02/2163460.html ※最近更新:Poj斜率优化题目 1180,2018,3709 列表一:经典题目题号:容易:
1018
·
2015-11-13 01:22
poj
URAL
1018
. Binary Apple Tree
链接 简单树形DP 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #include<stdlib.h> 6 using namespace std; 7 #define INF
·
2015-11-13 00:25
binary
URAL
1018
Binary Apple Tree(树DP)
Let's imagine how apple tree looks in binary computer world. You're right, it looks just like a binary tree, i.e. any biparous branch splits up to exactly two new branches. We will enumerate by intege
·
2015-11-12 21:50
binary
POJ
1018
Communication System
//此题是DP问题,可是我一直没有想出公式//组后只能根据带宽来枚举,再采用贪心策略 #include < iostream > using namespace std; int main() { int a[ 101 ][ 202 ],num[ 101 ]
·
2015-11-12 21:33
System
HDU
1018
Big Number
题目大意:求一个数的阶乘的位数。 单词积累:factorial 阶乘 题解:我们知道log10(n!)+1就是n的阶乘的位数,转化一下,log10(n!)+1=log10(1)+log10(2)+log10(3)+……+1; #include <cstdio> #include <cmath> int main(){ int n; scanf(
·
2015-11-12 20:47
number
杭电ACM-1.2.7 GPA
Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2472 Accepted Submission(s):
1018
·
2015-11-12 19:36
ACM
URAL
1018
Binary Apple Tree(树dp)
组队赛的时候的一道题,那个时候想了一下感觉dp不怎么好写呀,现在写了出来,交上去过了,但是我觉得我还是应该WA的呀,因为总感觉dp的不对。 #pragma warning(disable:4996) #include<iostream> #include<cstdio> #include<algorithm> #include<cstring&
·
2015-11-12 19:34
binary
poj
1018
Communication System_贪心
题意:给你n个厂,每个厂有m个产品,产品有B(带宽),P(价格),现在要你求最大的 B/P 明显是枚举,当P大于一定值,B/P为零,可以用这个剪枝 #include <iostream> #include<cstring> #include<cstdio> using namespace std; #define N 110 #define I
·
2015-11-12 17:09
System
POJ 动态规划题目列表
]POJ 动态规划题目列表 容易:
1018
, 1050, 1083, 1088, 1125, 1143, 1157, 1163, 1178, 1179, 1189, 1208, 1276,
·
2015-11-12 17:09
动态规划
POJ
1018
Communication System(分组背包DP)
和普通的分组DP还是有点差别的,要求背包容量固定的变化,而非1->V之类的 现在渐渐理解分组背包,1. 每组最多选择一个 2. 每组选择一个 ,这两类的差别就是在与dp数组的初始化问题 #include <cstdio> #include <cstdlib> #include <cstring> #define min(a,b) (((a)
·
2015-11-12 17:50
System
Ural
1018
(树形DP+背包+优化)
题目链接: http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=17662 题目大意:树枝上间连接着一坨坨苹果(不要在意'坨'),给定留下m根树枝,问最后剩下的最多苹果是多少。 解题思路: 其实意思和Vijos 1180(选课)的意思差不多。只不过权在边而已。 首先建无向图dfs。 for(f+1...j...
·
2015-11-12 13:34
优化
ural
1018
Binary Apple Tree(树dp)
space=1&num=
1018
题意: 有一棵苹果树,苹果树的是一棵二叉树,共N个节点,树节点编号为1~N,编号为1的节点为树根,边可理解为树的分枝,每个分支都长着若干个苹果,现在要要求减去若干个分支
·
2015-11-12 12:24
binary
hdu
1018
:Big Number(水题)
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21106 Accepted Submission(s): 9498 Probl
·
2015-11-12 10:54
number
poj
1018
暴力就可以过 View Code #include < iostream > #include < cstdio > #include < cstdlib > #include < cstring
·
2015-11-12 09:35
poj
杭电
1018
题
//求阶乘的位数 //方法:使用10的对数解决#include <iostream>#include <math.h>using namespace std;int main(){ int count; cin>>count; while(count--) { int number; &n
·
2015-11-12 09:41
杭电
HDU
1018
Big Number (简单数学)
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25649 Accepted Submission(s): 11635 Prob
·
2015-11-11 18:01
number
hdu
1018
Big Number
Problem Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are
·
2015-11-11 17:23
number
URAL
1018
. Binary Apple Tree(树形DP)
题目链接 第一个树形DP,这个题,以前用普通方法搞,WA了,然后知道是树形DP后,以为类似是数塔只不过是在树上而已,原来理解错了。。。参考了很多的解题报告,看了很多关于树形DP的文档。。终于,完成了,感觉非常类似滑雪的记忆化搜索。 状态转移分情况讨论一下,有和一个叉连接,和两个叉连接。节点数总是m+1的。 1 #include <stdio.h> 2 #include &
·
2015-11-11 15:48
binary
hdu
1018
Big Number (数学题)
Problem Description Inmany applications very large integers numbers are required. Some of theseapplications are using keys for secure transmission of data, encryption, etc.In this problem you are giv
·
2015-11-11 14:45
number
斯特林公式
题目来源:HDOJ
1018
(求阶乘的位数) 斯特林公式简介(维基百科): 斯特灵公式是一条用来取n阶乘近似值的数学公式。
·
2015-11-11 12:54
poj
1018
Communication System 枚举 VS 贪心
Communication System Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21631 Accepted: 7689 Description We have received an order from Pizoo
·
2015-11-11 10:54
System
HDOJ-
1018
Big Number
pid=
1018
题意:给出一个数n,输出n的阶乘的位数 汗Σ( ° △ °|||)︴刚开始还准备上大数乘法 然而10000的阶乘结果就已经接近40000位10^7的阶乘...
·
2015-11-11 09:57
number
POJ DP问题
列表一:经典题目题号:容易:
1018
, 1050, 1083, 1088, 1125, 1143, 1157,
·
2015-11-11 08:48
poj
POJ动态规划题目列表
列表一:经典题目题号:容易:
1018
, 1050, 1083, 1088, 1125, 1143, 1157, 1163
·
2015-11-11 06:22
动态规划
SHOI2008 题目总结
2333 BZOJ
1018
堵塞的交通: 题目大意:有一个2*n的矩阵,初始时没有边,每次可能会打通两个相邻的节点(相邻指曼哈顿距离为1)之间的无向道路或是拆毁两个相邻节点的道路,每次询问两个节点是
·
2015-11-11 05:31
2008
hdu
1018
(数学)
编辑器加载中 /*由斯特林[striling]公式可得: lnN!=NlnN-N+0.5ln(2N*pi) log10(N!)=lnN!/ln(10) 一个数字的位数,由对数来求。log10() // 求以10为底的对数log() // 以e为底的对数*///数学题#include <cmath>#include <cstdio>#include <iostrea
·
2015-11-11 05:15
HDU
BZOJ
1018
堵塞的交通traffic(线段树)
id=
1018
题意:一个2*n的格子,相邻格子之间有一条道路。初始时道路是不通的。 三种操作:(1)某条道路连起来;(2)某条道路断开;(3)询问某两个格子是否相连。
·
2015-11-11 03:26
线段树
别人整理的DP大全
动态规划 动态规划 容易:
1018
, 1050 , 1083 , 1088
·
2015-11-11 01:38
dp
1018
. Public Bike Management (30)
时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue There is a public bike service in Hangzhou City which provides great convenience to the touri
·
2015-11-11 00:56
public
Big Number
问题陈述: 杭州电子科技大学 HANGZHOU DIANZI UNIVERSITY Online Judge Problem -
1018
问题解析: 公式一:
·
2015-11-10 22:28
number
上一页
22
23
24
25
26
27
28
29
下一页
按字母分类:
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
其他