摘要: 原文链接:http://www.cnblogs.com/acSzz/archive/2012/02/24/2367008.html题目大意:某公司每个月都会盈利或者亏损,盈利的金额为s,亏损的金额为d,该公司每连续5个月报一次财政状况,即(1-5,2-6,3-7,4-8,5-9,6-10,7-11,8-12),这八次报账都显示公司为亏损,问,该公司年底最多能盈利多少,如果不能盈利输出Deficit。 分析:由于每5个月的报账都为亏损,所有连续的5个月里至少有1个月为亏损,则可能产生最优解的情况为如下4种 1 2 3 4 5 6 7 8 9 10 11 12 s s s s d s s s s 阅读全文
posted @ 2012-04-12 21:51 ZH奶酪 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 类型 长度 (bit) 有效数字 绝对值范围float 32 6~7 10^(-37) ~ 10^38double 64 15~16 10^(-307) ~10^308long double 128 18~19 10^(-4931) ~ 10 ^ 4932Problem: 2109User: qq1203456195Memory: 280KTime: 0MSLanguage: C++Result: Accepted#include <iostream>#include <math.h>using namespace std;int main(){ double n,p; 阅读全文
posted @ 2012-04-12 21:29 ZH奶酪 阅读(845) 评论(0) 推荐(0) 编辑
摘要: 题目:http://poj.org/problem?id=2965Problem: 2965User: qq1203456195Memory: 172KTime: 47MSLanguage: CResult: Accepted#include <stdio.h>int Arr[16]={ 0xf888,0xf444,0xf222,0xf111, 0x8f88,0x4f44,0x2f22,0x1f11, 0x88f8,0x44f4,0x22f2,0x11f1, 0x888f,0x444f,0x222f,0x111f};int Sln[16],idx_Sln;int M=0... 阅读全文
posted @ 2012-04-12 18:48 ZH奶酪 阅读(627) 评论(0) 推荐(0) 编辑