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. Ubuntu 安装 setuptools

    Setuptools的官方页面 Easily download, build, install, upgrade, and uninstall Python packages 它是一个对python的 ...

  2. ORACLE 最后表数据更新的时间

    SELECT SCN_TO_TIMESTAMP(MAX(ora_rowscn)) from myTable;

  3. 阿里云MVP:开发者的超能力,用技术创造更好世界

    阿里云MVP:开发者的超能力,用技术创造更好世界 2019年3月,第8期阿里云MVP(最有价值专家)完成终审,截至目前,全球已有27个国家和地区.近500位云计算专家和优秀开发者成为阿里云MVP.阿里 ...

  4. 如何使我们的薪资15k?

    以下我们来探讨一下如何才能使我们具备高薪15K的能力? 要想使自己的薪资成为15K,我首先想到的是我们的能力?编码能力?语言表达能力? 我觉得为之重要的则是我们的综合能力: 方方面面的能力.综合素质: ...

  5. java8的stream系列教程之filter过滤集合的一些属性

    贴代码 List<Student> lists = new ArrayList<>(); Student student = new Student(); student.se ...

  6. Directx教程(23) 简单的光照模型(2)

    原文:Directx教程(23) 简单的光照模型(2)    在工程myTutorialD3D11_16中,我在文件light.vs中定义了一个材质光源属性常量缓冲. //const buffer最好 ...

  7. SDUT-3375_数据结构实验之查找三:树的种类统计

    数据结构实验之查找三:树的种类统计 Time Limit: 400 ms Memory Limit: 65536 KiB Problem Description 随着卫星成像技术的应用,自然资源研究机 ...

  8. VIM中空格和TAB的替换

    在.vimrc中添加以下代码后,重启vim即可实现按TAB产生4个空格:set ts=4  (注:ts是tabstop的缩写,设TAB宽4个空格)set expandtab 对于已保存的文件,可以使用 ...

  9. Linux 下的mysql+centos7+主从复制

    mysql+centos7+主从复制   MYSQL(mariadb) MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可.开发这个分支的原因之一是:甲骨文公 ...

  10. 《mysql必知必会》笔记3(插入、更新、删除、创建删除更新表、视图)

    十九:插入数据 1:insert语句用来将行插入数据表中,可以插入完整的行.行的一部分.插入多行.插入某些查询的结果. 2:不指定列名,可以这样插入: insert into customers va ...