A. Lights Out

  • 模拟。

B. Convex Shape

  • 考虑每个黑色格子作为起点,拐弯次数为0的格子构成十字形,拐弯1次的则是从这些格子出发直走达到的点,显然需要遍历到所有黑色黑色格子。

C. k-Multiple Free Set

  • 对于每组\(x、kx、k^2x、\cdots\),设个数为\(c\),那么最多可以取\(\lfloor \frac{c+1}{2} \rfloor\)个。

D. Zero Tree

  • 考虑一个节点,其所有儿子节点均为叶节点,那么加法\减法操作可以一起做,显然只要考虑最值即可。
  • 当儿子节点归零后,父节点值也固定了,就变成了新的叶子节点,递归做即可。

E. The Last Hole!

  • (几何题,弃坑)

Codeforces Round #168 (Div. 2)的更多相关文章

  1. Codeforces Round #168 (Div. 2)---A. Lights Out

    Lights Out time limit per test 2 seconds memory limit per test 256 megabytes input standard input ou ...

  2. Codeforces Round #168 (Div. 1 + Div. 2)

    A. Lights Out 模拟. B. Convex Shape 考虑每个黑色格子作为起点,拐弯次数为0的格子构成十字形,拐弯1次的则是从这些格子出发直走达到的点,显然需要遍历到所有黑色黑色格子. ...

  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. JavaScript 基础知识之对比记忆学习

    1.  alter修改(易写混),alert警告 alert 函数语法:alert(str);str字符串用单引号或双引号隔开 2.标识符和关键字 标识符:由不以数字开头的字母.数字.下划线.$组成. ...

  2. 字符编码和python .encode().decode()方法

    字符编码与encode.decode的问题:  用8个开关表示世界万物   ASCII :  American Standard Code for Information Interchange,美国 ...

  3. c语言函数指针

    #include <stdio.h> typedef void (*intFunc)(int i); void test1(int age) { printf("test1:%d ...

  4. 【转】 Easy RadControl 之 RadGridView(Silverlight)

    1.不显示第1列即列指示器(Row Indicators) 在 telerik:RadGridView中设置属性   RowIndicatorVisibility="Collapsed&qu ...

  5. MySQL 通过semi join 优化子查询

    半连接是MySQL 5.6.5引入的,多在子查询exists中使用,对外部row source的每个键值,查找到内部row source匹配的第一个键值后就返回,如果找到就不用再查找内部row sou ...

  6. java实现服务端守护进程来监听客户端通过上传json文件写数据到hbase中

    1.项目介绍: 由于大数据部门涉及到其他部门将数据传到数据中心,大部分公司采用的方式是用json文件的方式传输,因此就需要编写服务端和客户端的小程序了.而我主要实现服务端的代码,也有相应的客户端的测试 ...

  7. mysql配置文件编写

    实例: 首先建立 mysql的配置文件 dbconfig.php <?php $phpexcel=array( "host"=>'localhost',//127.0. ...

  8. Django实现表单验证、CSRF、cookie和session、缓存、数据库多表操作(双下划綫)

    通常验证用户输入是否合法的话,是前端js和后端共同验证的,这是因为前端js是可以被禁用的,假如被禁用了,那就没法用js实现验证合法与否了,也就是即使用户输入的不合法,但是也没提示,用户也不知道怎么输入 ...

  9. Android开发学习笔记:Intent的简介以及属性的详解【转】

    一.Intent的介绍 Intent的中文意思是“意图,意向”,在Android中提供了Intent机制来协助应用间的交互与通讯,Intent负责对应用中一次操作的动作.动作涉及数据.附加数据进行描述 ...

  10. Android Studio Problem : failed to find style 'textviewstyle' in current theme 解决方法

    新建一个空白的MainActivity时Preview就出现一个错误: failed to find style 'textviewstyle' in current theme 开始在国内的博客平台 ...