Codeforces Round #370 (Div. 2) E. Memory and Casinos (数学&&概率&&线段树)
题目链接: 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 (数学&&概率&&线段树)的更多相关文章
- 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 ...
- Codeforces Round #538 (Div. 2) F 欧拉函数 + 区间修改线段树
https://codeforces.com/contest/1114/problem/F 欧拉函数 + 区间更新线段树 题意 对一个序列(n<=4e5,a[i]<=300)两种操作: 1 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- MySQL导入SQL文件及常用命令
在MySQL Qurey Brower中直接导入*.sql脚本,是不能一次执行多条sql命令的,在mysql中执行sql文件的命令: mysql> source d:/myprogr ...
- 通知Notification
步骤: 1.调用getSystemService()获取NotificationManager:NotificationManager manager = (NotificationManager)g ...
- Hadoop 简介
一个开源的,高可靠,可扩展的分布式计算框架 解决的问题 1 海量数据的存储(HDFS) 2海量数据的分析(Mapreduce) 3 分布式资源调度 (Yarn) 应用场景 日志分析,基于海量数据的在线 ...
- JSP页面和属性命名规范
1.页面命名: 登陆 Login注册 Register用户 User创建 Create修改 Update删除 Delete查询 Selete控制器 Controller用户名 Username密码 ...
- 。tar.gz(bz或bz2等)安装
tar.gz(bz或bz2等) 一.安装1.打开一个SHELL,即终端2.用cd 命令进入源代码压缩包所在的目录3.根据压缩包类型解压缩文件(*代表压缩包名称)tar -zxvf ****.tar.g ...
- sql 连接查询的区别 inner,left,right,full
--table1 表 ID NAME QQ PHONE1 秦云 10102800 135000002 在路上 10378 136000003 LEO 10000 139000004 秦云 024145 ...
- nginx基本配置和参数说明
#运行用户user nobody;#启动进程,通常设置成和cpu的数量相等worker_processes 1; #全局错误日志及PID文件#error_log logs/error.log;#err ...
- 30.Nginx集群搭建笔记
源码安装Nginx: tar -zxvf nginx-1.8.0.tar.gz -C /nginx/ #解压Nginx rpm -ivh keepalived-1.2.13-5.el6_ ...
- -/bin/sh: ./led: not found的解决办法
环境介绍: 开发板:qq2440 交叉编译器:arm-linux-gcc 3.4.1 内核版本:2.6.13 一.针对该类问题从两个方面入手: 1.从权限出发,权限不够会出现此问题 2.从库文件出发, ...
- 《简明python教程》笔记一
读<简明Python教程>笔记: 本书的官方网站是www.byteofpython.info 安装就不说了,网上很多,这里就记录下我在安装时的问题,首先到python官网下载,选好安装路 ...