Codeforces Round #163 (Div. 2)
A. Stones on the Table
- \(dp(i)\)表示最后颜色为\(i\)的最长长度。
B. Queue at the School
- 模拟。
C. Below the Diagonal
- 按行内点数排序,对于每行来说,从小的列开始放点。
D. BerDonalds
- (看题解还不会,弃坑)
E. More Queries to Array...
- 对于\(a_i\cdot (i-l+1)^k\)可以二项式展开,则原式=\[a_i\cdot\sum_{j=0}^{k}{\binom{k}{j}(i+1)^{k-j}(-l)^j}\]
- 由于\(k\le 5\),所以我们只需要维护\(a_i\cdot(i+1)^p\)这些值即可。
- 区间修改显然用线段树维护。
Codeforces Round #163 (Div. 2)的更多相关文章
- Codeforces Round #366 (Div. 2) ABC
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...
- Codeforces Round #354 (Div. 2) ABCD
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/out ...
- Codeforces Round #368 (Div. 2)
直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...
- cf之路,1,Codeforces Round #345 (Div. 2)
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... ...
- Codeforces Round #279 (Div. 2) ABCDE
Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems # Name A Team Olympiad standard input/outpu ...
- Codeforces Round #262 (Div. 2) 1003
Codeforces Round #262 (Div. 2) 1003 C. Present time limit per test 2 seconds memory limit per test 2 ...
- Codeforces Round #262 (Div. 2) 1004
Codeforces Round #262 (Div. 2) 1004 D. Little Victor and Set time limit per test 1 second memory lim ...
- Codeforces Round #371 (Div. 1)
A: 题目大意: 在一个multiset中要求支持3种操作: 1.增加一个数 2.删去一个数 3.给出一个01序列,问multiset中有多少这样的数,把它的十进制表示中的奇数改成1,偶数改成0后和给 ...
- Codeforces Round #268 (Div. 2) ABCD
CF469 Codeforces Round #268 (Div. 2) http://codeforces.com/contest/469 开学了,时间少,水题就不写题解了,不水的题也不写这么详细了 ...
随机推荐
- css取消input、select默认样式(手机端)
IOS端: background-color:transparent; border-color:transparent; andorid端: 仅仅使用上面的代码还不够,可以发现select框在某些浏 ...
- IIS7配置PHP运行环境
1.下载PHP运行包,网址:http://windows.php.net/download/ 选择的对应的版本包下载,并解压到相应的目录中(不限定),如:E:\vss\php\php_sdk 2.配置 ...
- LTE Module User Documentation(翻译14)——Uplink Power Control(上行功率控制)
LTE用户文档 (如有不当的地方,欢迎指正!) 20 Uplink Power Control(上行功率控制) 上行功率控制功能默认是开启的.用户可以通过设置布尔属性 ns3::LteUePhy: ...
- Java原始的8中数据类型
数据类型 大小 范围 默认值 ======== ======== ============================================ =========byte(字节) ...
- Linux线程的实现 & LinuxThread vs. NPTL & 用户级内核级线程 & 线程与信号处理
另,线程的资源占用可见:http://www.cnblogs.com/charlesblc/p/6242111.html 进程 & 线程的很多知识可以看这里:http://www.cnblog ...
- Filestream(读写)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...
- Shell重定向文件描述符
#!/bin/bash 最近在看shell,各种困惑,不过解决困惑的感觉还是很不错的.废话少说,linux中使用文件描述符来标识每个文件对象.文件描述符为一个非负整数,可以唯一标识会话中打开 ...
- python3 字符串相关函数
python版本 3.5 #Author by Liguangbo#_*_ coding:utf-8 _*_str="i like study python, welcome to my p ...
- thinkphp分页搜索条件带中文参数
/** * 中文处理 * @param type $str * @return str * $author lxh */ function url2word($str){ $sub=strpos($s ...
- jQuery1.9为动态添加元素绑定事件以及获取和操作checkbox的选择属性
1.jQuery为动态添加的元素绑定事件:在1.7之后,添加了live()方法,1.9后又被移除,1.9中可用on()方法: $(function() { $('.btn').on('click', ...