这题的意思大概是 每个老师都会给出交作业的期限和没按时交会扣掉的分数 要求出扣除最少分数的情况是一题典型的贪心一开始只是把排序排完 发现不大对就无解了 看了题解才发现排序后还要合理安排 思维还不够到位啊排序把扣除分数最大的排在最前面 如果满足条件就把第 i 门作业安排在截至日期那天 否则则前推#in...
分类:
其他好文 时间:
2014-08-09 02:27:56
阅读次数:
289
http://acm.hdu.edu.cn/showproblem.php?pid=4893
开始的时候,我按双标记,WA了一下午,搞不定,我是用的两个标记add--表示当前结点中有值发生变化,flag,斐波那契的懒惰标记,但是估计是我自己处理的有问题,一直不对
参考了别人的代码,写法还是很不错的,Add变量维护的是,完全变成Fibonacci的时候的和,---回头我再重新写一遍
#...
分类:
其他好文 时间:
2014-08-08 21:29:26
阅读次数:
276
Problem C
If We Were a Child Again
Input: standard input
Output: standard output
Time Limit: 7 seconds
“Oooooooooooooooh!
If I could do the easy mathematics like my school days!!
I...
分类:
编程语言 时间:
2014-08-08 18:10:16
阅读次数:
281
您可能听说过,带有 yield 的函数在 Python 中被称之为 generator(生成器),何谓 generator ? 我们先抛开 generator,以一个常见的编程题目来展示 yield 的概念。 如何生成斐波那契數列 斐波那契(Fibonacci)...
分类:
编程语言 时间:
2014-08-08 16:37:36
阅读次数:
306
Doing Homework againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6499Accepted Submission(s): 38...
分类:
其他好文 时间:
2014-08-08 01:56:45
阅读次数:
296
陆陆续续看完了圣经第一章,熟悉了unix的整个编程流程,c语言的用处在这里得到伸张。 从unix的体系结构,原来操作系统包括内核及一些其他软件,我们常常误称为linux内核为操作系统,这俨然成为一种共识。基本熟悉了shell的介绍,主流的是bash(Bourne-again shell),un...
分类:
其他好文 时间:
2014-08-07 22:37:08
阅读次数:
194
Description
The Romans have attacked again. This time they are much more than the Persians but Shapur is ready to defeat them. He says: "A lion is never afraid of a hundred sheep".
Nevertheless ...
分类:
其他好文 时间:
2014-08-07 13:14:40
阅读次数:
269
Problem Description
ACboy was kidnapped!!
he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(.
As a smart ACMer, you want to get A...
分类:
其他好文 时间:
2014-08-07 09:51:09
阅读次数:
262