A. Yaroslav and Permutations

  • 值相同的个数不能超过\(\lfloor \frac{n + 1}{2} \rfloor\)。

B. Yaroslav and Two Strings

  • 答案=总方案数-(S<=W)的方案-(W<=S)的方案+(W==S)的方案。

C. Greg and Array

  • 线段树统计每个操作的使用次数,后面就是普通区间加的线段树操作。

D. Greg and Graph

  • 反过来操作,即每次加一个点,然后更新距离和。
  • 先计算新点到其他点的最短距离,然后就是floyd的加点更新。

E. Greg and Friends

  • \(g(i,j,k)\)表示有i个50kg,j个100kg,船在k岸的最小次数。
  • 按照次数的大小关系,可以计算相应的方案数。

###


E. Yaroslav and Points

  • 考虑每个值的贡献,相当于维护\(\sum{i\cdot x_i}\),线段树。

Codeforces Round #179 (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. 文件下载工具类 DownLoadUtil 实战

    package com.cloud.mina.util; import java.io.File; import java.io.FileInputStream; import java.io.IOE ...

  2. 【心有猛虎】react-pxq

    这是一个比较完整的简单的react移动端项目,说起来页面少,其实,构思若是精巧,也并不容易做 先放源码:https://github.com/bailicangdu/react-pxq 接下来我们简单 ...

  3. linux下Nginx安装Zend Optimizer组件步骤

    注意:Zend Optimizer 在php5.3以上的版本已经集成了,所以php5.3以上的版本没必要安装了.而推出了Zend Guard Loader. http://www.zend.com/e ...

  4. scala实现定时任务的方法

    /** * ScheduledExecutorService是从Java SE5的java.util.concurrent里,做为并发工具类被引进的,这是最理想的定时任务实现方式. * 它有以下好处: ...

  5. img标签src不给路径就会出现边框

    <img/>在src加载失败或没有给的,浏览器会自动给img加上边框. 如下图这样: 产品觉得影响美观,一定要pass掉. 原码是这样: .ctn{ position: relative; ...

  6. BOM的对象总结(location,screen,navigator,history)

    location对象 专门保存当前窗口正在打开的url的对象. 常用的属性有: location.href 保存了完整的url:这种方式做常用 在当前窗口打开: location.href=新url ...

  7. 一句python,一句R︱python中的字符串操作、中文乱码、NaN情况

    一句python,一句R︱python中的字符串操作.中文乱码.NaN情况 先学了R,最近刚刚上手Python,所以想着将python和R结合起来互相对比来更好理解python.最好就是一句pytho ...

  8. jdbc知识点(连接mysql)

    jdbc连接mysql 1.JDBC简介 JDBC: 指 Java 数据库连接,是一种标准Java应用编程接口( JAVA API),用来连接 Java 编程语言和广泛的数据库.从根本上来说,JDBC ...

  9. MongoDB sharding 集合不分片性能更高?

    最近云上用户用户遇到一个 sharding 集群性能问题的疑惑,比较有代表性,简单分享一下 测试配置 mongos x 2.shard x 3 测试1:集合不开启分片,批量 insert 导入数据,每 ...

  10. MacOS配置双网

    目的 日常工作中,我们可能会同时需要用到公司的内网以及互联网,为了避免来回的切换,我们可以通过配置电脑的两个网卡来实现同时访问内网和互联网. 环境说明 互联网 无线网卡 网关 子网掩码 内网 有线网卡 ...