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 ...
随机推荐
- OpenLayers使用弹出窗口
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head ...
- 【JZOJ4711】【NOIP2016提高A组模拟8.17】Binary
题目描述 输入 输出 样例输入 6 6 8 9 1 13 9 3 1 4 5 2 6 9 1 3 7 2 7 7 1 6 1 2 11 13 样例输出 45 19 21 数据范围 解法 40%暴力即可 ...
- docker.[6] 数据卷
docker.[6] 数据卷 操作指令: # docker run -v /data1:/data2 -i -t centos /bin/bash 参数说明: data1 : 这里指的是宿主机的目录( ...
- Pyhton AES_cbc解密
最近很多朋友问我加密解密有没有啥好推荐的方式,一般对AES的加密解密方式直接用在线加密或者解密就行,我为了方便测试,将网址以python脚本的形式写了出来,很简单的东西,2分钟搞定,随手记录一下~~ ...
- Leetcode695.Max Area of Island岛屿的最大面积
给定一个包含了一些 0 和 1的非空二维数组 grid , 一个 岛屿 是由四个方向 (水平或垂直) 的 1 (代表土地) 构成的组合.你可以假设二维矩阵的四个边缘都被水包围着. 找到给定的二维数组中 ...
- 【水滴石穿】React Native 组件之SafeAreaView
本文转载自:https://blog.csdn.net/xiangzhihong8/article/details/80692792 SafeAreaView简介 ReactNative官方从0.50 ...
- 编程语言分类及python所属类型
编程语言分类及python所属类型 编程语言主要从以下几个角度为进行分类:编译型和解释型.静态语言和动态语言.强类型定义语言和弱类型定义语言. 编译和解释的区别是什么? 编译器是把源程序的每一条语句都 ...
- 外贸电子商务网站之Prestashop 语言包安装
prestashop添加语言-下载语言包 我们找到中文简体(Chinese-Simplified)一行,点击最后一栏的下载(Download)按钮,我们点击下载,可以下到一个以语言的 ISO为文件名, ...
- myeclipse的最有用的设置
1 取消Myeclipse的自动文件验证(卡傻的原因) Windows –> Perferences –>Myeclipse –> Validation,保留manual(手动) ...
- php switch判断一个数所在的范围
<?php header("content-type:text/html;charset=utf8"); $score=70; switch($score) { case $ ...