L-qf 的博客

ACM之缘

排序:
默认
按更新时间
按访问量

UVA-11572 Unique Snowflakes (STL)

Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devised a machine that captures snowflakes as they fall, a...

2018-09-07 09:43:28

阅读数:12

评论数:0

UVA-11134 Fabled Rooks (贪心)

We would like to place n rooks, 1 ≤ n ≤ 5000, on a n × n board subject to the following restrictions • The i-th rook can only be placed within the r...

2018-09-05 17:46:48

阅读数:9

评论数:0

UVA-1152 (二分) 4 Values whose Sum is 0

The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d) ∈ A × B × C × D...

2018-09-04 17:00:17

阅读数:12

评论数:0

UVA-1605 Building for UN

The United Nations has decided to build a new headquarters in Saint Petersburg, Russia. It will have a form of a rectangular parallelepiped and will ...

2018-09-03 21:16:24

阅读数:14

评论数:0

UVA-120Stacks of Flapjacks

Stacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete...

2018-09-03 20:46:39

阅读数:11

评论数:0

竞赛篇-----二分查找

/* 二分查找,左闭右开区间 注意查找的数组一定是有序的 */ #include<cstdio> #include<iostream> #include<algorithm&am...

2018-08-28 20:15:58

阅读数:17

评论数:0

竞赛篇----归并排序顺带求逆序数

/* 归并排序实现 求逆序数 O(nlogn) */ #include<cstdio> #include<iostream> #include<algorithm&gt...

2018-08-28 20:11:42

阅读数:20

评论数:0

竞赛篇-----最大连续和问题

1)首先最简单的就是模拟时间复杂度是O(n^3) /* 最大连续和问题 O(n^3) */ #include<cstdio> #include<iostream> using namespace std; ...

2018-08-28 18:37:20

阅读数:21

评论数:0

HDU-2829 Lawrence(dp+四边形优化)

题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2829 #include<cstdio> #include<iostream> #include&am...

2018-08-27 20:33:02

阅读数:26

评论数:0

UVA-10003 Cutting Sticks (动规-四边形不等式dp)

题目:           You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money accordi...

2018-08-27 09:38:09

阅读数:18

评论数:0

HDU-2545树上战争(找根节点)

题目信息:http://acm.hdu.edu.cn/showproblem.php?pid=2545 #include<cstdio> #include<iostream> #include&am...

2018-08-24 15:41:35

阅读数:27

评论数:0

HDU-2540 遮挡判断(贪心+数学)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2540 #include<cstdio> #include<iostream> #include&am...

2018-08-24 09:30:13

阅读数:28

评论数:0

HDU-2539 点球大战(字符串处理)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2539 #include<cstdio> #include<iostream> #include&am...

2018-08-23 19:41:26

阅读数:30

评论数:0

HDU-2526 浪漫手机(下一行的每个字符由上一行的顶部三个决定,)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2526 思路: 自己找出范围是m<=1000,每行的左右都是0,但是不能输出,上一行的字符决定下一行。 #include<cstdio&...

2018-08-23 11:40:57

阅读数:26

评论数:0

HDU-2515 Yanghee 的算术(数学计算)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2515 思路:将数表中的数存放在a数组中             先算出第一个数,然后用0~n-2个数表中的数依次算出剩下的n-1个数,             计算第一个数的方法有很多,大致意思...

2018-08-23 09:30:49

阅读数:37

评论数:0

HDU-5873 Football Games(思维题)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5873 #include<cstdio> /* 得分从小到大排序,对于当前i,与之前的i-1支队伍比赛完之后,所有的比赛的总得分至少是(i-1)*i 每...

2018-08-22 11:11:12

阅读数:15

评论数:0

HDU-2527 Safe Or Unsafe(哈夫曼树)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2527 #include<cstdio> #include<iostream> #include&am...

2018-08-21 20:24:59

阅读数:16

评论数:0

HDU-2523SORT AGAIN(水!注意读题!!不然会tle)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2523 代码: /* 注意题上说了有k-1个不同!!!!的组合数小于它,所以要判重 还有就是 题上说了每个数小于2000,所以组合数结果肯定小于2000,即结果在2000里判断 不能用sort...

2018-08-21 09:17:03

阅读数:20

评论数:0

HDU-2512 一卡通大冒险(第二类斯特林数)

借鉴:https://blog.csdn.net/flynn_curry/article/details/59156101 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2512 思路:已知第一类斯特灵数: 将p个物体排成k个非空循环排列的方法...

2018-08-20 11:15:41

阅读数:13

评论数:0

HDU-2522A simple problem (1/n 的循环小数)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2522 代码: #include<cstdio> #include<iostream> #include&a...

2018-08-20 09:34:17

阅读数:21

评论数:0

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