Advertisement

Y2K会计漏洞测试和训练(POJ 2586版本)

阅读量:

Y2K Accounting Bug

Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 5559 Accepted: 2712

Description

计算机师学会(ACM)因Y2K漏洞遭受损失,并因此无法完整收集数据来编制MS公司1999年的年度报告。
他们唯一能回忆起的是,在1999年每个月MS公司要么出现盈余要么出现亏损,并且在那些盈利的月份盈余额为s,在亏损的月份亏损额为d。至于哪几个月盈利或亏损以及具体次数,则记不清了。
与大多数公司不同的是,在一年中每隔五个月就会发布一次财务报表。ACM发现这8次发布的结果均为亏损记录但不清楚具体数额是多少。
首席会计师几乎可以肯定说,在1999年整个年度中MS即将实现盈利目标;然而情况并不十分乐观。

Develop a program that determines whether MS Inc. incurred a deficit in 1999 or whether there exists a potential surplus in 1999, and calculate the maximum possible surplus they could achiev

全部评论 (0)

还没有任何评论哟~