经典算法
文章平均质量分 79
Go开发人员
我自风情万种 与世无争
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
经典算法之dfs——第一季(放苹果)
经典算法之dfs——第一季(放苹果)dfs(深度优先算法)问题一: 放苹果问题问题描述:把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。输入:第一行是测试数据的数目t(0 <= t <= 20)。以下每行均包含二个整数M和N,以空格分开。1<=M,N<=10。输出:对输入的每组数据M...原创 2018-06-27 10:45:59 · 760 阅读 · 0 评论 -
发工资咯(HDU2021)
Problem Description 作为杭电的老师,最盼望的日子就是每月的8号了,因为这一天是发工资的日子,养家糊口就靠它了,呵呵 但是对于学校财务处的工作人员来说,这一天则是很忙碌的一天,财务处的小胡老师最近就在考虑一个问题:如果每个老师的工资额都知道,最少需要准备多少张人民币,才能在给每位老师发工资的时候都不用老师找零呢? 这里假设老师的工资都是正整数,单位元,人民币一共有100元、50...原创 2019-03-07 19:27:46 · 241 阅读 · 0 评论 -
Max Sum(hdu 1003)
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,4,-7), the max sum in this sequence is 6 + (-1) + 5 +...原创 2019-05-13 20:22:20 · 160 阅读 · 0 评论 -
Let the Balloon Rise(hdu 1004)
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i...原创 2019-05-13 20:51:19 · 234 阅读 · 0 评论 -
CF230A Dragons
题目描述 Kirito is stuck on a level of the MMORPG he is playing now. To move on in the game, he's got to defeat allnndragons that live on this level. Kirito and the dragons have strength, which is repr...原创 2019-09-26 11:14:48 · 345 阅读 · 0 评论 -
CF609A USB Flash Drives
题目描述 Sean is trying to save a large file to a USB flash drive. He hasnnUSB flash drives with capacities equal toa_{1},a_{2},...,a_{n}a1,a2,...,anmegabytes. The file size is equal tommmegabyt...原创 2019-09-26 16:36:22 · 404 阅读 · 0 评论
分享