摘要: 题目来源 The 13th Zhejiang University Programming Contest链接:http://openoj.awaysoft.com:8080/judge/contest/view.action?cid=421#overviewA -Alien's Organ题意: 事件出现平均概率为a, 问出现次数小于等于N的概率解法: 泊松分布,,跟着公式算就好.View Code // p(k) = e^(-ave) * ave^k / k!#include<cstdio>#include<cmath>int main(){ double 阅读全文
posted @ 2013-05-09 13:40 yefeng1627 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 训练赛链接:http://www.acmore.net/contest.php?cid=1013Problem A: Yard题意: n*m的格子,有树与空地,要求每个位置上下左右树的数量为偶数.求拔除与种植最小花费.解法: 状态压缩, 第一行状态确定后,则所有行都确定. 然后枚举第一行状态,取个最小值即可.View Code #include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>using namespace std; const int inf = 0x3f3 阅读全文
posted @ 2013-05-09 13:21 yefeng1627 阅读(406) 评论(0) 推荐(0) 编辑

Launch CodeCogs Equation Editor