A B C :=w=

D:两个人得分互不影响很关键

一种是f[i][j]表示前i轮,分差为j的方案数

明显有f[i][j]=f[i-1][j-2k]+2*f[i-1][j-2k+1]+...+(2k+1)f[i-1][j]+...

枚举是K*T*T,转移是K 超时

不过发现转移的时候可以理解为j是j-1的算式的整个区间移动,于是可以维护f[i-1]的前缀和来达到O(1)的转移

另一种f[i][j]表示前i轮,某个人分数为j的方案数(两人互不影响,无先后手之分,所以两人等价)

式子写出来就少了第一种的前面的系数,还是要维护前缀和,更加清楚直接了

最后统计时候枚举第一个人的分数,累乘结果

E:???

Codeforces Round #370(div 2)的更多相关文章

  1. Codeforces Round #370 (Div. 2) E. Memory and Casinos (数学&&概率&&线段树)

    题目链接: http://codeforces.com/contest/712/problem/E 题目大意: 一条直线上有n格,在第i格有pi的可能性向右走一格,1-pi的可能性向左走一格,有2中操 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. Codeforces Round #370 (Div. 2) C. Memory and De-Evolution 水题

    C. Memory and De-Evolution 题目连接: http://codeforces.com/contest/712/problem/C Description Memory is n ...

  7. Codeforces Round #370 (Div. 2) B. Memory and Trident 水题

    B. Memory and Trident 题目连接: http://codeforces.com/contest/712/problem/B Description Memory is perfor ...

  8. Codeforces Round #370 (Div. 2) A. Memory and Crow 水题

    A. Memory and Crow 题目连接: http://codeforces.com/contest/712/problem/A Description There are n integer ...

  9. Codeforces Round #370 (Div. 2)(简单逻辑,比较水)

    C. Memory and De-Evolution time limit per test 2 seconds memory limit per test 256 megabytes input s ...

随机推荐

  1. python scrapy版 极客学院爬虫V2

    python scrapy版 极客学院爬虫V2 1 基本技术 使用scrapy 2 这个爬虫的难点是 Request中的headers和cookies 尝试过好多次才成功(模拟登录),否则只能抓免费课 ...

  2. A record--Offline deployment of Big Data Platform CDH Cluster

    A record--Offline deployment of Big Data Platform CDH Cluster Tags: Cloudera-Manager CDH Hadoop Depl ...

  3. GacUI学习(二)

    GacUI学习(一)之高仿系统记事本(二) 转载请注明来源:http://www.cnblogs.com/lyfh/p/6107614.html 上篇<GacUI学习(一)之高仿系统记事本(一) ...

  4. Spring-data-jpa详解,全方位介绍。

    本篇进行Spring-data-jpa的介绍,几乎涵盖该框架的所有方面,在日常的开发当中,基本上能满足所有需求.这里不讲解JPA和Spring-data-jpa单独使用,所有的内容都是在和Spring ...

  5. linux原始套接字(2)-icmp请求与接收

    一.概述                                                    上一篇arp请求使用的是链路层的原始套接字.icmp封装在ip数据报里面,所以icmp请 ...

  6. 查看centos系统版本

    1.查看系统版本 [root@yl-web yl]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) 2.查看内核版本 [ro ...

  7. 清除浮动clear/BFC

    浮动的清除有两种方式: 一.clear clear:both/left/right; 二.创建BFC (1)什么是BFC? BFC,块级格式化上下文,是一个独立的渲染区域,只有Block-level ...

  8. POJ 1724 ROADS【最短路/搜索/DP】

    一道写法多样的题,很具有启发性. 具体参考:http://www.cnblogs.com/scau20110726/archive/2013/04/28/3050178.html http://blo ...

  9. HDU2191悼念512汶川大地震遇难同胞——珍惜现在,感恩生活[多重背包]

    悼念512汶川大地震遇难同胞——珍惜现在,感恩生活 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Jav ...

  10. 添加事件及Event对象的兼容写法

    一.事件流 事件流描述的是从页面中接受事件的顺序. IE的事件流是事件冒泡流,而Netscape的事件流是事件捕获流 1.事件冒泡 事件冒泡,即事件最开始由最具体的元素(文档中嵌套层次最深的那个节点) ...