博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  多校联合题

摘要:G-WindProblem Description N棵树和M个蘑菇排成一排. 每棵树有自己的坐标和高度, 每个蘑菇有自己的坐标和权值. 一阵大风刮来, 每棵树有Li%的概率往左边倒, 有Ri%的概率往右边倒, 有(1 – Li% - Ri%)的概率不倒. 如果一棵高度为H坐标为X的树往左边倒下, 那么坐标在区间[X – H, X)内的蘑菇就会被砸到, 如果往右边倒下, 那么坐标在区间(X, X + H]内的蘑菇就会被砸到. 求不被树砸到的所有的蘑菇的权值之和的期望值。 Input 第一行包含2个整数N, M.接下来N行, 每行4个整数X, H, L, R. 表示这棵树的坐标, 高度和往左右倒 阅读全文

posted @ 2012-08-20 20:18 皇星客栈--Linux 阅读(184) 评论(0) 推荐(0)

摘要:A.ChessProblem DescriptionWe have a chessboard, as the figure below, it shows the chessboard with dimension 1, 3, 5, 7 (We ignore the even number).Now, your task is to place K bishops on the n – dimension chessboard and satisfied that none of then attack each other ( A bishop can move to any distan. 阅读全文

posted @ 2012-08-18 11:29 皇星客栈--Linux 阅读(268) 评论(0) 推荐(0)