。。。

导航

2017年5月10日 #

随机生成数据 文件数据的输入输出

摘要: **以下代码的用途是: 生成1000个长为150二进制串,将每个二进制串输出到test.in文件里**#include#include#include#includeint main(){ freopen("test.in","w",stdout); //用"w"打开的文... 阅读全文

posted @ 2017-05-10 23:25 大学僧 阅读(528) 评论(0) 推荐(0) 编辑

HDU1108最小公倍数 水题

摘要: ** Problem Description 给定两个正整数,计算这两个数的最小公倍数。Input 输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output 对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sam... 阅读全文

posted @ 2017-05-10 23:00 大学僧 阅读(143) 评论(0) 推荐(0) 编辑

2017年5月9日 #

TJUoj水题 数羊

摘要: ***After a long night of coding, Charles Pearson Peterson is having trouble sleeping. This is not only because he is still thinking about the ... 阅读全文

posted @ 2017-05-09 17:44 大学僧 阅读(186) 评论(0) 推荐(0) 编辑

2017年5月5日 #

HDU2602 01背包入门 Bone Collector【01背包模板题】

摘要: Problem Description Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of b... 阅读全文

posted @ 2017-05-05 16:32 大学僧 阅读(165) 评论(0) 推荐(0) 编辑

HDU2546饭卡 01背包入门

摘要: ** Problem Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,... 阅读全文

posted @ 2017-05-05 07:31 大学僧 阅读(152) 评论(0) 推荐(0) 编辑

2017年5月3日 #

HAUTOJ 1266: 最大子段和 河工大校赛DP

摘要: **1266: 最大子段和题目描述一个大小为n的数组a1到an(−10^4≤ai≤10^4)。请你找出一个连续子段,使子段长度为奇数,且子段和最大。输入第一行为T(1≤T≤5),代表数据组数。 之后每组数据,第一行为n(1≤n≤10^5),代表数组长度。 之后一行n个数,代表a1到a... 阅读全文

posted @ 2017-05-03 19:13 大学僧 阅读(281) 评论(0) 推荐(0) 编辑

2017年5月2日 #

2010辽宁省赛You are my brother

摘要: **题目描述 Little A gets to know a new friend, Little B, recently. One day, they realize that they are family 500 years ago. Now, Little A wants t... 阅读全文

posted @ 2017-05-02 18:10 大学僧 阅读(154) 评论(0) 推荐(0) 编辑

2017年4月27日 #

省赛集训水题 仓库的位置

摘要: **题目描述 小明最近做起了物流生意,为了提高送货效率,小明想请你帮他确定一下仓库的最佳位置。 为了简化问题,小明认为所有的客户住所都在一条坐标轴上,并且每个住所都在轴上有一个坐标。小明每天都会将货物从仓库送到各个客户手中。 请问仓库安置在什么位置(位置可以是轴上的任意点,也可以和客... 阅读全文

posted @ 2017-04-27 15:50 大学僧 阅读(184) 评论(0) 推荐(0) 编辑

2017年4月26日 #

河南省第七届省赛 问题 F: Turing equation 水题

摘要: **题目描述 The fight goes on, whether to store numbers starting with their most significant digit or their least significant digit. Sometimes t... 阅读全文

posted @ 2017-04-26 18:48 大学僧 阅读(164) 评论(0) 推荐(0) 编辑

hdu杭电1003 dp 连续子序列最大值

摘要: Problem Description Given a sequence a[1],a[2],a[3]……a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,... 阅读全文

posted @ 2017-04-26 07:27 大学僧 阅读(138) 评论(0) 推荐(0) 编辑