题目链接: http://codeforces.com/contest/712/problem/E

题目大意:

一条直线上有n格,在第i格有pi的可能性向右走一格,1-pi的可能性向左走一格,有2中操作:单点修改pi以及询问从L格出发最终从R格离开区间[L,R]的概率。

这题在cf上A的人比较少,本来不打算去做的,然后看了下是概率的题目,比较感兴趣,就去做了下,然后发现并不会做,就搜了题解。

题解:

参考http://www.cnblogs.com/qscqesze/p/5868047.html 感觉已经讲得非常透彻了。我就不再废话了。

主要是不知道概率怎么算. 其中对B数组的维护值得学习。

Codeforces Round #370 (Div. 2) E. Memory and Casinos (数学&&概率&&线段树)的更多相关文章

  1. Codeforces Round #370 (Div. 2) E. Memory and Casinos 线段树

    E. Memory and Casinos 题目连接: http://codeforces.com/contest/712/problem/E Description There are n casi ...

  2. Codeforces Round #538 (Div. 2) F 欧拉函数 + 区间修改线段树

    https://codeforces.com/contest/1114/problem/F 欧拉函数 + 区间更新线段树 题意 对一个序列(n<=4e5,a[i]<=300)两种操作: 1 ...

  3. Codeforces Round #365 (Div. 2) D. Mishka and Interesting sum 离线+线段树

    题目链接: http://codeforces.com/contest/703/problem/D D. Mishka and Interesting sum time limit per test ...

  4. Codeforces Round #250 (Div. 1) D. The Child and Sequence(线段树)

    D. The Child and Sequence time limit per test 4 seconds memory limit per test 256 megabytes input st ...

  5. Codeforces Round #222 (Div. 1) B. Preparing for the Contest 二分+线段树

    B. Preparing for the Contest 题目连接: http://codeforces.com/contest/377/problem/B Description Soon ther ...

  6. Codeforces Round #345 (Div. 1) D. Zip-line 上升子序列 离线 离散化 线段树

    D. Zip-line 题目连接: http://www.codeforces.com/contest/650/problem/D Description Vasya has decided to b ...

  7. Codeforces Round #370 (Div. 2)C. Memory and De-Evolution 贪心

    地址:http://codeforces.com/problemset/problem/712/C 题目: C. Memory and De-Evolution time limit per test ...

  8. Codeforces Round #370 (Div. 2)B. Memory and Trident

    地址:http://codeforces.com/problemset/problem/712/B 题目: B. Memory and Trident time limit per test 2 se ...

  9. Codeforces Round #370 (Div. 2) D. Memory and Scores 动态规划

    D. Memory and Scores 题目连接: http://codeforces.com/contest/712/problem/D Description Memory and his fr ...

随机推荐

  1. 绝对炫的3D幻灯片-SLICEBOX

    绝对炫的3D幻灯片-SLICEBOX http://www.jq22.com/jquery-info31

  2. 启动windows bat文件出现错误,直接关闭

    如果执行运行run.bat,提示错误直接退出后,可以直接使用cmd命令进入当前目录,运行,会显示错误信息.

  3. Seo标签权重

    最近接手凤凰焦点的业务,首先做的现有线上业务梳理,接着是拆分模块. 页头部分有些争议.假设把页头做成一个组件,pc端因为不能页面加载的差不多了页头才突兀的出来一是体验不好,还有不利于seo,最终决定还 ...

  4. Solr Cloud - SolrCloud

    关于 Solr Cloud Zookeeper 入门,介绍 原理 原封不动转自 http://wiki.apache.org/solr/SolrCloud/ ,文章的内存有些过时,但是了解原理. Th ...

  5. HTCondor安装

    192.168.30.253 master     cd /etc/yum.repos.dwget http://research.cs.wisc.edu/htcondor/yum/repo.d/ht ...

  6. 【算法】Hough变换

    终于看懂点了霍夫变换,以下内容来源为吉大的硕士论文,作者王阳阳 上图引用自 http://www.cnblogs.com/Ponys/p/3146753.html

  7. VB检测按键CTRL+C的次数

    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As IntegerPriv ...

  8. 如何查看python 的api

    python 搭建好python开发环境后,怎么查看api文档呢? 其实很简单: 首先打开命令行,在dos窗口输入: python -m pydoc -p 4895 python -m pydoc - ...

  9. javascript event(事件对象)详解

    javascript event(事件对象)详解   1. 事件对象     1. 事件对象 Event 对象代表事件的状态,比如事件在其中发生的元素.键盘按键的状态.鼠标的位置.鼠标按钮的状态. 什 ...

  10. 理解HTTP幂等性

    转载: 理解HTTP幂等性 基于HTTP协议的Web API是时下最为流行的一种分布式服务提供方式.无论是在大型互联网应用还是企业级架构中,我们都见到了越来越多的SOA或RESTful的Web API ...