自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

天亮说晚安

https://github.com/yew1eb

  • 博客(31)
  • 资源 (5)
  • 收藏
  • 关注

原创 Codeforces Round #197(div 2)

AHelpful Mathsstandard input/output2 s, 256 MB  x2427BXenia and Ringroadstandard input/output2 s, 256 MB  x2150CXenia and Weights

2013-08-27 09:31:15 1910

原创 数论练习专题

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=25496#overviewhttp://acm.hust.edu.cn/vjudge/contest/view.action?cid=21558#overview

2013-08-25 08:44:05 1872

原创 hdu1712 ACboy needs your help

跟资源分配类型动态规划里的机器分配相似。背包九讲里的分组背包模型, 三重循环OK。第一重枚举第几组,第二重枚举背包容量,要倒着来,第三重枚举该组里面的物品。#include #include #define max(a,b) a>b ? a:bint a[110][110];int f[110];int main(){ int n,m, i, k, j;

2013-08-24 15:30:39 1622

原创 poj3211 Washing Clothes(多次01背包)

多次01背包每种颜色的衣服的分到一组,费用是洗一件衣服的时间,每组求解出最少时间,再逐组累加起来。#include #include using namespace std;const int maxn = 102;const int maxm = 12;struct tt { char clr[11]; int cnt; int sum

2013-08-24 15:09:54 1675

原创 Hdu 1059 Dividing & Zoj 1149 & poj 1014 Dividing(多重背包)

多重背包模板~#include #include int a[7];int f[100005];int v, k;void ZeroOnePack(int cost, int weight){ for (int i = v; i >= cost; i--) if (f[i - cost] + weight > f[i]) f[i]

2013-08-24 14:55:01 1969

原创 poj1384 Piggy-Bank(完全背包)

http://poj.org/problem?id=1384恰好装满的最小价值~#include #include const int INF = 1000000000;int f[10010];int main(){ int E, F, W, T, n, p, w,i , j; scanf("%d\n",&T); while(T--) {

2013-08-24 14:43:47 1759

原创 poj2063 Investment(多次完全背包)

http://poj.org/problem?id=2063多次完全背包~#include #include #define MAXN 50000#define max(a,b) ((a)>(b)?(a):(b))int dp[MAXN];int v[11], c[11];int main(){ int t, m, year, d, i, j, k, sum;

2013-08-24 14:37:56 1786

原创 树型动态规划小练

Ural 1018POJ 1463POJ 1947POJ 2057POJ 2486POJ 3140POJ 3342POJ 3345

2013-08-24 09:10:50 2050

原创 树状数组习题总结

TopCoder Tutorials:http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=binaryIndexedTrees#prob 1、要向上统计,向下修改;一般是修改一段区间的值,查找的是某个位上的值;2、要向上修改,向下统计;一般是修改某个位置上的值,查找的是一段区间的和;可以用树状数组的地方,一定可以用线段树

2013-08-24 08:32:52 2402

原创 hdu1251 统计难题 (Trie)

题意:给你一些单词,要你统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀)。裸Tire~,上模板:Code:#include #include using namespace std;const int maxn = 500000;const int maxw = 20;struct node { bool f; //是否是单词 int ch

2013-08-23 20:57:22 2160

原创 hdu1711 Number Sequence,KMP

题意:给你两个长度分别为n(1 )和m(1 )的序列a[]和b[],求b[]序列在a[]序列中出现的首位置。如果没有请输出-1。这题用裸KMP算法O(N)水过~KMP算法的两个函数:Code(hdu1711):#include #include const int maxn = 1000005;const int maxm = 10005;int

2013-08-23 17:01:52 1778

原创 poj1948 Triangular Pastures

大意:给你n根木棒,要你拼接成面积最大的三角形。由于数据规模很小。所以我们可以将问题转化为 可行性问题的判定。(DP)设f[i][j]表示能否拼接成三边为i , j, sum-i-j的三角形。计算出f[i][j],然后两重循环枚举i和j,记录下最大面积值。

2013-08-20 13:01:02 1626

原创 zoj2059 The Twin Towers(经典的DP)

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1059经典的DP,不会做啊    (╬ ̄皿 ̄)凸 。。。。。。。。。。。设dp[j]表示高度差为j时,矮塔的高度。对于每个块x,只有两种放法,1)放到高塔上          2)放到矮塔上   采用滚动数组,维护两个一维数组就可以了。

2013-08-20 10:51:43 1697

原创 poj1220 (高精度任意进制转换)

http://poj.org/problem?id=1220高精度任意进制转换代码是从discuss里找到的,据说是maigo神牛写的。超精简!!我自己第一写的时候,还把n进制先转成10进制,然后再从10进制转为m进制。。。悲催的是写了好长滴,还没调对啊!!!Code:#include #include const int maxn = 1000;

2013-08-20 02:36:15 2859

原创 poj2392 Space Elevator(多重背包)

http://poj.org/problem?id=2392题意:有一群牛要上太空。他们计划建一个太空梯-----用一些石头垒。他们有K种不同类型的石头,每一种石头的高度为h_i,数量为c_i,并且由于会受到太空辐射,每一种石头不能超过这种石头的最大建造高度a_i。帮助这群牛建造一个最高的太空梯。吐槽:做练习的时候,连需不需要对数据排序都没分析清楚。。。下次再也不把练习安排

2013-08-20 00:43:30 2129

原创 zoj2972 Hurdles of 110m

当时练习的时候,没有想清楚。  (#-.-)这题挺水的,把状态转移方程推出来就知道写了。Code:#include #include #define min(a,b) a<b ? a:bconst int maxn = 115;const int INF = 1000000000;int f[maxn][maxn];//f[i][j]表示第i个阶段耗费j点力量

2013-08-19 10:14:49 1695

原创 poj1365 Prime Land

数字的质因子分解。。Code:#include #include #include #include using namespace std;typedef long long LL;int main() { LL n, p, t, i; int pri[100], e[100]; while (true) { cin >> p

2013-08-19 06:01:20 1911

原创 斯特灵数 (Stirling数)

@维基百科在组合数学,Stirling数可指两类数,都是由18世纪数学家James Stirling提出的。第一类s(4,2)=11第一类Stirling数是有正负的,其绝对值是个元素的项目分作个环排列的方法数目。常用的表示方法有。换个较生活化的说法,就是有个人分成组,每组内再按特定顺序围圈的分组方法的数目。例如:{A

2013-08-17 15:17:28 2258

原创 hdu2199 Can you solve this equation?

http://acm.hdu.edu.cn/showproblem.php?pid=2199二分求单调方程的解。#include #include double L, R, M;int T;double Y;double f(double x){ return (8*pow(x, 4.0) + 7*pow(x,3.0)+ 2*pow(x, 2.0) + 3*x +

2013-08-16 20:12:58 1689

原创 USCAO4.2 The Perfect Stall ,二分图最大匹配

题目地址:http://acm.nefu.edu.cn/JudgeOnline/problem/474.jsp题意:给你n 头牛,和m 个墙,每头牛有自己喜欢的墙,要求每堵墙只能有一头牛,求最多的匹配数。分析:二分图的最大匹配sample_input5 52 2 53 2 3 42 1 53 1 2 51 2sample_output4如下构成二

2013-08-16 11:23:55 1741

原创 poj2195 Going Home,最小费用最大流

题意:给定一个N*M的地图,地图上有若干个man和house,且man与house的数量一致。man每移动一格需花费$1(即单位费用=单位距离),一间house只能入住一个man。现在要求所有的man都入住house,求最小费用。分析:二分图的最大匹配我采用的是最小费用最大流算法,重点在建图。Code:#include #include #inclu

2013-08-15 23:57:27 1875

原创 01. 搭配飞行员 [网络流24题]

提交地址:http://cojs.tk/cogs/problem/problem.php?pid=14分析:二分图的最大匹配,网络最大流。思路: 采用最大流算法。 增加源点和汇点。 1、S向X集合中每个顶点连一条容量为1的有向边。2、Y集合中每个顶点向T连一条容量为1的有向边。3、XY集合之间的边都设为从A集合中的点到B集合之中的点,容量为1的有向边。建好图

2013-08-14 11:25:04 1875

原创 poj1833 排列

next_permutation()函数的使用。提交的时候 G++会超时, C++能过。#include #include using namespace std;int a[1040];int main(){ int n, k, i, t; scanf("%d", &t); while (t--) { scanf("%d%d", &n

2013-08-13 03:40:48 1711 2

原创 poj2084 Game of Connections

Catalan数,组合数学书上有公式。import java.math.*; import java.io.*; import java.util.*; public class Main { public static void main(String [] args){ Scanner cin = new Scanner(System.i

2013-08-13 03:21:56 1621

原创 贝尔数,分拆

@维基百科贝尔数以埃里克·坦普尔·贝尔(Eric Temple Bell)为名,是组合数学中的一组整数数列,开首是(OEIS的A000110数列):Bn是基数为n的集合的划分方法的数目。集合S的一个划分是定义为S的两两不相交的非空子集的族,它们的并是S。例如B3 = 5因为3个元素的集合{a, b, c}有5种不同的划分方法:{ Bn表示[n]上的分拆个数,

2013-08-12 22:42:47 2900

原创 POJ 1273 || HDU 1532 Drainage Ditches ,最大流入门题

Drainage DitchesHal BurchTime Limit 1000 msMemory Limit 65536 kbdescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the cl

2013-08-09 10:00:08 1822

原创 ZOJ2002 Copying Books

Copying BooksTime Limit: 2 Seconds     Memory Limit: 65536 KBBefore the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be re-written by hand

2013-08-08 11:43:33 1732

原创 HDU4544 湫湫系列故事――消灭兔子

HDU 4544Tags: 数据结构,贪心Analysis:将兔子的血量从大到小排序,将箭的杀伤力从大到小排序,对于每一个兔子血量,将比他大的杀伤力大的剑压入优先队列,优先队列自己重写,让它每次抛出的数为价钱最小。Code:#include #include #include #include using namespace std;typed

2013-08-08 11:10:21 1700

原创 hdu1051 Wooden Sticks

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1051大意:求最少升序序列的个数。#include #include #include #define N 5000 + 5using namespace std;struct node { int x, y; bool operator < (const

2013-08-04 16:16:25 1634

原创 hdu1050 Moving Tables

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1050求区间上点的最大重叠次数。#include #include int main(){ int t, s, e, i, n, max, tmp; int mark[205]; scanf("%d", &t); while (t--) {

2013-08-04 15:51:00 1816

原创 SRM587 (div2)

第一题:InsertZ              简单题,唉,脑子转的太慢了,我做完的时候只剩下145(250)分了。              看了别人代码只有一行直接呆了: return goal.replace("z","").equals(init) ?"yes":"No"; 第二题:JumpFurtherInsertZ

2013-08-02 23:20:20 1918

《Streaming Systems》 英文版 完整版

声明:仅供学习研究参考之用,不得公开传播发行或用于商业用途! 建议大家多多支持正版:https://www.amazon.cn/dp/1491983876/ref=sr_1_1?ie=UTF8&qid=1539237846&sr=8-1&keywords=streaming+systems

2018-10-11

hadoop-eclipse-plugin-2.7.0.jar_

Hadoop-eclipse-plugin插件

2015-05-19

hadoop-eclipse-plugin-2.7.0.jar

Hadoop-eclipse-plugin插件

2015-05-19

hadoop-common-2.2.0-bin_32bit_&_64bit

windows 下远程调试hadoop,运行报空指针,需要导入hadoop.dll winutils.exe两个依赖到hadoop安装目录的bin中

2015-05-19

2014年湖南省第十届程序设计竞赛题目数据标程(by Rujia Liu)

2014年湖南省第十届程序设计竞赛题目数据标程(by Rujia Liu) HNCPC 2014

2014-12-27

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除