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)的更多相关文章

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

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

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

  4. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  5. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

  6. cf之路,1,Codeforces Round #345 (Div. 2)

     cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....   ...

  7. Codeforces Round #279 (Div. 2) ABCDE

    Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems     # Name     A Team Olympiad standard input/outpu ...

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

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

随机推荐

  1. C++中常见错误整理(不定期更新)

    1.cannot have cv-qualifier 在C++中CV指const和volatile,非成员函数和静态成员函数不能有CV限定.

  2. ini配置文件格式

    转自:http://blog.sina.com.cn/s/blog_6988593e0101e6i4.html  程序没有任何配置文件,那么它对外是全封闭的,一旦程序需要修改一些参数必须要修改程序代码 ...

  3. linux msql

    安装mysql 1.使用rpm 安装mysql 或者使用yum安装 使用rpm 安装 下载 Centos 7 所需要的mysql包 tar -xf 解压整合包 根据依赖 安装 common>li ...

  4. 麦咖啡阻挡正常打开Excel文件

    双击打开Excel文件,提示如下图: Excel文件被麦咖啡做阻挡,无法正常打开 处理方案: 过一会儿还是出现此问题,干脆就把缓冲区保护给禁用掉

  5. 关于Spring注解

    * @author 小郑 1        * @content ejb3注解的API定义在javax.persistence.*包里面. 2        * 注释说明: 3        * @E ...

  6. java的数据类型转换

    java中有八种基本数据类型分别是字节型byte.整型int.短整型short.长整型long.单精度浮点型float.双精度浮点型double.字符型char.布尔型boolean.这些基本数据类型 ...

  7. Enterprise Architect 学习 之 活动图

    UML中,活动图用来展示活动的顺序.显示了从起始点到终点的工作流,描述了活动图中存在于事件进程的判断路径.活动图可以用来详细阐述某些活动执行中发生并行处理的情况.活动图对业务建模也比较有用,用来详细描 ...

  8. C语言程序设计第9堂作业

    一.本次课主要内容: 本章将散布在前五章中的数据类型和表达式等内容做了归纳性的汇总,本次课需要掌握以下两个方面: (1)本次课通过从数据在计算机内的存储格式入手,介绍整型.字符型.单精度和双精度实型四 ...

  9. Spring学习笔记(2)——Bean的配置

    要使应用程序中的Spring容器成功启动,需要以下三个方面的条件都具备: 1.Spring框架的类包都已经放到应用程序的类路径下 2.应用程序为Spring提供完备的Bean配置信息 3.Bean的类 ...

  10. Noi2011 阿狸的打字机

    ..] of longint; e,q,fa,ps,pt,fail,ans:..] of longint; trie:..,..] of longint; c:..] of longint; s:.. ...