Codeforces Round #169 (Div. 2)
A. Lunch Rush
- 模拟。
B. Little Girl and Game
- 因为可以打乱顺序,所以只关心每种数字打奇偶性。
- 若一开始就是回文,即奇数字母为0或1种,则先手获胜。
- 若奇数字母大于1,则只需要考虑奇数字母个数的奇偶性。因为后手可以保证奇数字母个数的奇偶性。
C. Little Girl and Maximum Sum
- 考虑每个位置覆盖次数,显然覆盖次数多分配大权值。
D. Little Girl and Maximum XOR
- 找到 \(l,r\) 不相同的最高位,那么为了异或和最大,该位必然是a=0,b=1,在固定该位后,应该使a尽可能大b尽可能小,同时不同位多,那么显然构成\(、1000\cdots 、 0111\cdots\) 两个串即可求得最大。
E. Little Girl and Problem on Trees
- 题目保证除1以外的点的度数不超过2,也就是整棵树是个菊花状,那么问题即转化成维护区间值问题。
Codeforces Round #169 (Div. 2)的更多相关文章
- Codeforces Round #169 (Div. 2) E. Little Girl and Problem on Trees dfs序+线段树
E. Little Girl and Problem on Trees time limit per test 2 seconds memory limit per test 256 megabyte ...
- Codeforces Round #169 (Div. 2) A水 B C区间更新 D 思路
A. Lunch Rush time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...
- 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 ...
随机推荐
- zookeeper集群安装与配置
转自: http://my.oschina.net/u/2377453/blog/464739 1.解压zookeeper 2.在$ZOOKEEPER_HOME/conf下创建zoo.cfg文件(参考 ...
- [DPDK][转]DPDK编程开发(4)—lcore
1.知识百科 返回值 操作函数 函数功能 RTE_DECLARE_PER_LCORE (unsigned, _lcore_id) RTE_DECLARE_PER_LCORE (rte_cpuset_t ...
- NGUI如何使2D图片按像素1:1显示在屏幕上
NGUI版本为3.5.1. 将camera 设置为正交模式,size值设为1. UIRoot(2D)有3种缩放样式: 1.PixelPerfect.UI严格按照指定的像素大小显示,不会随着屏幕的分辨率 ...
- jsp 动态包含和静态包含
jsp其实就是一个servlet或者说一个java文件,做这样三件事:打印html标签到页面,处理逻辑,输出结果 现在有两个jsp文件,包含者1和被包含者2 静态包含,就是把2的java代码塞到1的代 ...
- Eclipse快捷键 10个最有用的快捷键
Eclipse中10个最有用的快捷键组合 一个Eclipse骨灰级开发者总结了他认为最有用但又不太为人所知的快捷键组合.通过这些组合可以更加容易的浏览源代码,使得整体的开发效率和质量得到提升. 1. ...
- 2016 - 1 - 25 CSS初步 (二)
1.The customising link We can change the link's style when we move our pointer on the link like that ...
- eclipse + marven
eclipse使用maven管理项目,可以自动下载依赖包(尤其是容易引起依赖包冲突的场合),也可以实现打jar包,编译等功能 1 eclipse安装maven插件 使用Eclipse--help-- ...
- JAVA代理模式与动态代理模式
1.代理模式 所谓代理,就是一个人或者一个机构代表另一个人或者另一个机构采取行动.在一些情况下,一个客户不想或者不能够直接引用一个对象,而代理对象可以在客户端和目标对象之前起到中介的作用.代理模式给某 ...
- BZOJ 4204 && BZOJ 2510 循环矩阵
n^3logn非常显然.所以要用一种因为这个矩阵是一个循环矩阵,所以只要知道第一行就可以知道所有行了. C[i][j]=C[i-1][j-1]; #include <iostream> # ...
- jquery.extend方法
jquery.extend()用来扩展jquery中方法,实现插件. 1.jQuery.extend函数详细用法! 扩展jQuery静态方法. 1$.extend({ 2test:function() ...