Y2K Accounting Bug(poj2586)】的更多相关文章

题意: 有一个公司由于某个病毒使公司赢亏数据丢失,但该公司每月的 赢亏是一个定数,要么一个月赢利s,要么一月亏d.现在ACM只知道该公司每五个月有一个赢亏报表,而且每次报表赢利情况都为亏.在一年中这样的报表总共有8次(1到5,2到6,…,8到12),现在要编一个程序确定当赢s和亏d给出,并满足每张报表为亏的情况下,全年公司最高可赢利多少,若存在,则输出多多额,若不存在,输出"Deficit".   分析: 在保证连续5个月都亏损的前提下,使得每5个月中亏损的月数最少.        …
转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents 题目链接:http://poj.org/problem?id=2586 ---------------------------------------------------------------------------------------------------------------------------------------------------------- 欢…
Y2K Accounting Bug Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10024 Accepted: 4990 Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. Al…
Y2K Accounting Bug Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10674   Accepted: 5344 Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc…
Y2K Accounting Bug Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10674   Accepted: 5344 Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc…
题目链接:http://poj.org/problem?id=2586 题目大意:(真难读懂啊)给你两个数,s,d,意思是MS公司每个月可能赚钱,也可能赔钱,如果赚钱的话,就是赚s元,如果赔钱的话,就是陪d元.现在告诉你只要是连续的5个月,就亏钱(亏多少不知道),问你MS公司全年能够赚多少钱,如果赚不了钱的话,就输出“Deficit” 贪心:我们说,输出的最终结果是f(x,y)=x*s-y*d,也就是说现在要求得x,y使得f(x,y)具有最大值. 当s,d,x+y给定时,x越大,则赚的钱越多.…
题目连接:http://poj.org/problem?id=2586 题意:次(1-5.2-6.3-7.4-8.5-9.6-10.7-11.8-12),次统计的结果全部是亏空(盈利-亏空<0).题目给出S和D,判断全年是否能盈利,如果能则求出盈利的最大值,如果不能盈利则输出Deficit 解析: 全年的盈亏情况可以由前五个月直接决定1.若SSSSD亏空,那么全年最优情况为SSSSDSSSSDSS 2.若SSSDD亏空,那么全年最优情况为SSSDDSSSDDSS 3.若SSDDD亏空,那么全年最…
[POJ2586]Y2K Accounting Bug 试题描述 Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS Inc. posted a surplus or a deficit each month…
Y2K Accounting Bug   Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS Inc. posted a surplus or a deficit each month…
Y2K Accounting Bug Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10945   Accepted: 5499 Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc…