Codeforces Round #179 (Div. 1 + Div. 2)
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)的更多相关文章
- 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 ...
- 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 ...
- Educational Codeforces Round 43 (Rated for Div. 2)
Educational Codeforces Round 43 (Rated for Div. 2) https://codeforces.com/contest/976 A #include< ...
- Educational Codeforces Round 35 (Rated for Div. 2)
Educational Codeforces Round 35 (Rated for Div. 2) https://codeforces.com/contest/911 A 模拟 #include& ...
- 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 ...
- 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 ...
- Educational Codeforces Round 63 (Rated for Div. 2) 题解
Educational Codeforces Round 63 (Rated for Div. 2)题解 题目链接 A. Reverse a Substring 给出一个字符串,现在可以对这个字符串进 ...
- 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 < ...
- Educational Codeforces Round 48 (Rated for Div. 2) CD题解
Educational Codeforces Round 48 (Rated for Div. 2) C. Vasya And The Mushrooms 题目链接:https://codeforce ...
- Educational Codeforces Round 60 (Rated for Div. 2) 题解
Educational Codeforces Round 60 (Rated for Div. 2) 题目链接:https://codeforces.com/contest/1117 A. Best ...
随机推荐
- 【SDOI2017】套路总结
1 第一题是裸的反演: \[\begin{align} Ans&=\prod_{i=1}^n\prod_{j=1}^ma[(i,j)]\\ &=\prod_{d=1}^na[d]^{f ...
- Python之其他数据类型
1.可命名元组:namedtuple 由nametuple可创建一个包含tuple所有功能以及其他功能的类型 class Mytuple(__builtin__.tuple) | Mytuple(x, ...
- Android中View的layout mechanism(布局机制)
layout mechanism Android中View的layout mechanism主要分为两个阶段:measure阶段和layout阶段.layout mechanism按照一定的顺序进行, ...
- database homework1
mysql> select * from teacher_info; +----+------+-----+--------+---------+ | id | name | age | sal ...
- js中的replace问题和textarea回车符问题
在textarea中输入回车符 在js读取textarea中的值有\r\n然后到业务层转换到string中就有可能变成空格形式然后被存入数据库,当在取出此值的时候则会变成空格的形式,因此我们需要将不显 ...
- UIScrollView 实践经验
UIScrollView(包括它的子类 UITableView 和 UICollectionView)是 iOS 开发中最常用也是最有意思的 UI 组件,大部分 App 的核心界面都是基于三者之一或三 ...
- oracle审计的格式
audit table; audit table by xxx(username); audit table by xxx(username) whenever not successful; 系统表 ...
- docker 常用的命令
1.运行容器 sudo docker run -d -t -p : --name demo ubuntu:16.04 2.删除容器 sudo docker rm -f demo 3.在容器中安装必备软 ...
- MUI - 打开页面默认弹出键盘及返回关闭键盘
打开页面默认弹出键盘及返回关闭键盘 http://www.cnblogs.com/phillyx/ (function(keyboard) { var openSoftKeyboard = funct ...
- 你在用 JWT 代替 Session?
现在,JSON Web Tokens (JWT) 是非常流行的.尤其是 Web 开发领域. 流行 安全 稳定 易用 支持 JSON 所有这些因素,令 JWT 名声大振. 但是,今天我要来说说使用 JW ...