Codeforces Round #209 (Div. 2)
来源:互联网 发布:鹤壁公务员网络培训 编辑:程序博客网 时间:2024/06/04 19:49
A:一次搞定不可能,如果有边界上的点可以两次搞定,没有的话每一次就只能搞定一个角落了,所以答案不是2就是3
B:
for(int i = 1; i <= n; i++) { if(k) printf("%d %d ",i*2,i*2-1),--k; else printf("%d %d ",i*2-1,i*2); }n+k - (n-k) = 2*k
C:con1*x^i + con2*x^(i+1) + ..
假如con1不能被x整除,这个式子能提取出的最大的x幂次的因子是不是就是x^i了
然后就暴力化简就好了
D:整除关系是一种偏序关系,跟大于小于类似,于是马上联想到以前做过的题上,对于每个位置处理处L[i] R[i] 表示往左往右能延伸的极限
复杂度O(n)
类似的题
http://poj.org/problem?id=2559
- Codeforces Round #209 (Div. 2)
- Codeforces Round #209 (Div. 2)
- Codeforces Round #209 (Div. 2)
- Codeforces Round #209 (Div. 2) A. Table
- Codeforces Round #209 (Div. 2) B. Permutation
- Codeforces Round #209 (Div. 2) <A-D>
- Codeforces Round #209 (Div. 2)思路
- Codeforces Round #209 (Div. 2) A.Table
- Codeforces Round #102 (Div. 2)
- Codeforces Round #103 (Div. 2)
- Codeforces Round #103 (Div. 2)
- Codeforces Round #104 (Div. 2)
- Codeforces Round #105 (Div. 2)
- Codeforces Round #105 (Div. 2)
- Codeforces Round #107 (Div. 2)
- Codeforces Round #108 (Div. 2)
- Codeforces Round #110 (Div. 2)
- Codeforces Round #122 (Div. 2)
- 一个看起来比较舒服的文本框样式
- 静态链表
- centos6.5 USB无线网卡安装TL-WN725N
- LONG LONG AGO
- plsql 常用快捷键设置
- Codeforces Round #209 (Div. 2)
- .net 查找动态创建的控件的控件名
- CTime简单用法
- Oracle - SGA → data_buffer_cache
- hdu 2579 Dating with girls(2)(BFS)
- C++类的使用
- java NIO
- c++ 类的定义 使用
- C++类的继承