A. Ciel and Dancing

  • 模拟。

B. Ciel and Flowers

  • 混合类型的数量只能为0、1、2,否则3个可以分成各种类型各自合成。

C. Ciel and Robot

  • 考虑一组命令得到的点集,那么后面的点的起始点会对应于其中点集中的一个点。

D. Ciel and Duel

  • 两种策略:

    1. atk-atk:一个取最小的前若干个,一个取最大的若干个。
    2. atk-def、atk:对于def状态的,需要优先取最靠近的值抵消,剩余atk状态的也是取最近的。

E. Ciel the Commander

  • 0应该设置成尽可能通过多的点对,此时树会变成若干棵子树,则变成了子问题,那么显然是点分治了。

F. D. Ciel and Flipboard

  • 枚举第\(x\)行的翻转状态。
  • 对于\(i \lt x\)的行来说,在不影响\(x\)行状态的条件下,\((i,j)\)和\((i+x+1,j)\)的翻转状态总是一致的。
  • 考虑\(i<x\)的行,在不影响其他列的条件下,\((i,j)\)和\((i, j+x+1)\)的翻转状态应该是一致的。
  • \(j=x\)的列需要单独考虑,如果不翻转,则对其他列无影响。如果翻转,那么对于所有\(j<x\)的点\((i, j)\)和\((i, j+x+1)\)的翻转状态总是相反的。
  • 于是对于每一行来说,相对于其他行都是独立的。考虑\(j=x\)的翻转状态,可以得到两种类型的和,\[type0=max(a(i,j)+a(i, j+x+1), -a(i,j)-a(i,j+x+1))\\type1=max(a(i,j)-a(i,j+x+1),-a(i,j)+a(i,j+x+1))\]

G. Ciel and Gondolas

  • 朴素的dp做法容易想:\(dp(i,j)\)表示用\(i\)辆车拉走\(j\)个人的最小代价,复杂度\(O(n^2k)\)。
  • \(opt(i,j)\)表示\(dp(i,j)\)的最优决策点,可证明\(opt(i,j)\le opt(i,j+1)\)。
  • 根据决策点的单调性,可以使用分块dp优化,时间复杂度\(O(nklogn)\)。

Codeforces Round #190 (Div. 1 + Div. 2)的更多相关文章

  1. Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship Time Limit: 2000 mSec P ...

  2. Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems(动态规划+矩阵快速幂)

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems Time Limit: 3000 mSec P ...

  3. Educational Codeforces Round 43 (Rated for Div. 2)

    Educational Codeforces Round 43 (Rated for Div. 2) https://codeforces.com/contest/976 A #include< ...

  4. Educational Codeforces Round 35 (Rated for Div. 2)

    Educational Codeforces Round 35 (Rated for Div. 2) https://codeforces.com/contest/911 A 模拟 #include& ...

  5. Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings

    Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings 题目连接: http://cod ...

  6. Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes

    Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes 题目连接: http://code ...

  7. Educational Codeforces Round 63 (Rated for Div. 2) 题解

    Educational Codeforces Round 63 (Rated for Div. 2)题解 题目链接 A. Reverse a Substring 给出一个字符串,现在可以对这个字符串进 ...

  8. Educational Codeforces Round 39 (Rated for Div. 2) G

    Educational Codeforces Round 39 (Rated for Div. 2) G 题意: 给一个序列\(a_i(1 <= a_i <= 10^{9}),2 < ...

  9. Educational Codeforces Round 48 (Rated for Div. 2) CD题解

    Educational Codeforces Round 48 (Rated for Div. 2) C. Vasya And The Mushrooms 题目链接:https://codeforce ...

  10. Educational Codeforces Round 60 (Rated for Div. 2) 题解

    Educational Codeforces Round 60 (Rated for Div. 2) 题目链接:https://codeforces.com/contest/1117 A. Best ...

随机推荐

  1. Laravel访问出错错误信息:`Warning: require(/vendor/autoload.php): failed to open stream: No such file or dire

    错误信息:`Warning: require(/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php): failed to open str ...

  2. Linux下安装配置maven

    参考博客: http://www.blogjava.net/caojianhua/archive/2011/04/02/347559.html 注意事项: 1.解压目录 我的maven解压目录为: / ...

  3. Mybatis使用 爬坑记录

    1.mapper.xml可以直接 使用map集合, parameterType="java.util.Map" resultType="java.util.Map&quo ...

  4. [LeetCode] Evaluate Reverse Polish Notation [2]

    题目 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, ...

  5. gitlab 添加本地项目

    1.安装git    https://git-scm.com/downloads 2.新建工程 3.创建密钥 a.桌面右键 b.cd ~/.ssh/ 如果提示 “ No such file or di ...

  6. Spring_使用(JDBC)

    Spring_对JDBC的支持 使用JdbcTemplate更新数据库 导入jar包 创建applicationcontext.xml <?xml version="1.0" ...

  7. 【JZOJ4934】【NOIP2017GDKOI模拟1.12】a

    helpless fucking 结论:如果一个数可以被对于a序列中每个数的最大公约数整除,那么它就是好的. Bitch Man 感性证明: 贪心地想,对于a序列中的任意两个数,它们的最大公约数可由这 ...

  8. 威胁快报|首爆,新披露Jenkins RCE漏洞成ImposterMiner挖矿木马新“跳板”

    简介 阿里云安全于近日捕获到一起使用Jenkins RCE漏洞进行攻击的挖矿事件.除挖矿外,攻击者还曾植入具有C&C功能的tsunami木马,也预留了反弹shell的功能,给用户带来极大安全隐 ...

  9. 未能加载文件或程序集 XXX 或它的一个依赖项。参数错误

    引发原因 :电脑突然蓝屏重启 解决方法:删除 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files 下的所有文件 ...

  10. 用div漂浮快实现与表单无关的多文件上传功能。

    我项目有这个需求,多文件上传,而且要及时显示到表单上,这样的话就不能与表单相关. 由于我对前端不熟,我就实现了这么一个功能,通过button触发一个div漂浮块,然后多文件上传,之后通过js把文件名显 ...