A. Ilya and Bank Account

  • 模拟。

B. Ilya and Queries

  • 前缀和。

C. Ilya and Matrix

  • 考虑每个元素的贡献。
  • 边长为\(2^n\)时,贡献为最大值;
  • 边长为\(2^{n-1}\)时,贡献为前4大值;
  • 边长为\(2^{n-2}\)时,贡献为前16大值;
  • 以此类推。

D. Ilya and Roads

  • \(dp(i,j)\)表示前\(i\)个洞修复了\(j\)个的最小代价。
  • \(dp(i,j)=min\{dp(k,j-(i-k))+c\}\),\(c\)是\(r=i\)的所有公司。
  • 根据转移式子,很容易想到区间最小值问题,一开始用线段树,然后对公司的\(l_i\)排序,可以利用单调栈优化。

E. Ilya and Two Numbers

  • 贪心(自己也不太会),大概是先凑成\(m-1\),否则凑\(、、m-2、m-3、...\)
  • 具体可能还是要看代码
  • 官方题解

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

  1. 递推 Codeforces Round #186 (Div. 2) B. Ilya and Queries

    题目传送门 /* 递推:用cnt记录前缀值,查询区间时,两个区间相减 */ #include <cstdio> #include <algorithm> #include &l ...

  2. [Codeforces Round #186 (Div. 2)] B. Ilya and Queries

    B. Ilya and Queries time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  3. [Codeforces Round #186 (Div. 2)] A. Ilya and Bank Account

    A. Ilya and Bank Account time limit per test 2 seconds memory limit per test 256 megabytes input sta ...

  4. Codeforces Round #186 (Div. 2).D

    纠结的一道dp. 状态转移方程还是比较好想的,优化比较纠结 D. Ilya and Roads time limit per test 3 seconds memory limit per test ...

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

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

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

  7. Codeforces Round #368 (Div. 2)

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

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

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

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

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

随机推荐

  1. BootstrapValidator实现注册校验和登录错误提示效果(转)

    使用BootstrapValidator进行注册校验和登录错误提示,具体内容如下 1.介绍 在AdminEAP框架中,使用了BootstrapValidator校验框架,本文以注册校验的用户名.登录名 ...

  2. Vue调试神器之Vue.js devTools

    Vue项目中使用Vue.js devTools这款调试神器,可以极大程度的提高我们的开发效率. 安装 1.打开Chrome网上应用商店安装插件(自墙),直接搜索devTools安装即可.贵宾传送阵,请 ...

  3. POJ1485 Sumdiv

    Sumdiv Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 22680   Accepted: 5660 Descripti ...

  4. class介绍

    ES6引入了Class(类)这个概念,作为对象的模板.通过class关键字,可以定义类.基本上,ES6的class可以看作只是一个语法糖,它的绝大部分功能,ES5都可以做到,新的class写法只是让对 ...

  5. 【软件安装】我喜欢的notepad插件

    1.文件管理器 explorer 2.16进制查看文件工具 HEX-Editor

  6. python的数据类型和变量

    数据类型 计算机顾名思义就是可以做数学计算的机器,因此,计算机程序理所当然地可以处理各种数值.但是,计算机能处理的远不止数值,还可以处理文本.图形.音频.视频.网页等各种各样的数据,不同的数据,需要定 ...

  7. PHPCMS快速建站系列之标签循环嵌套

    标签循环嵌套方法,可以实现对PC标签循环调用,代码如下: 在此文件里/phpcms/lib/classes/template_cache.class.php 里的 template_parse 方法里 ...

  8. 远程安装App到手机

    注意: 必须是手机和电脑网络连通正常 1. 手机端安装终端模拟器. 2. 打开终端模拟器执行下面命令(也可以在adb shell中执行): su setprop service.adb.tcp.por ...

  9. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试 代码工程地址: https://github.co ...

  10. 解释型语言Python