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 ...
随机推荐
- Filter详解(转)
以前以为Filter只是一个特殊点的Servlet,用进只需在web.xml中配置一下拦截路径就可以了,可经过这两天的深入学习,才知道以前对Filter类的了解和使用都太过浅薄了. 在网上看了很多篇相 ...
- freemarker 取值(插值)(转)
Java数据模型 1)基本数据类型取值 八种基本的java类型:byte.short.int.long:float,double:char:boolean 对应的封装类型:Byte.Short.Int ...
- docker.[7] 数据卷容器
docker.[7] 数据卷容器 挂在数据卷容器的方法: # docker run --volumes-from [Container Name]
- delete records in table A not in table B
转)A.B两表,找出ID字段中,存在A表,但是不存在B表的数据.A表总共13w数据,去重后大约3W条数据,B表有2W条数据,且B表的ID字段有索引. 方法一 使用 not in ,容易理解,效率低 ...
- php array_key_exists() 与 isset() 的区别
一个基本的区别是isset()可用于数组和变量,而array_key_exits()只能用于数组. 但是最主要的区别在于在设定的条件下的返回值. 现在我们来验证一下这个最主要的区别. array_ke ...
- 【风马一族_php】NO5_php基础知识_数组
原文来自:http://www.cnblogs.com/sows/p/6032570.html (博客园的)风马一族 侵犯版本,后果自负 回顾 匿名函数 定义: 变量 = function [参数列表 ...
- JavaScript--函数中this的几种指向
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Intersection of Two Linked Lists两链表找重合节点
Write a program to find the node at which the intersection of two singly linked lists begins. For ex ...
- 【JZOJ4791】【NOIP2016提高A组模拟9.21】矩阵
题目描述 在麦克雷的面前出现了一个有n*m个格子的矩阵,每个格子用"."或"#"表示,"."表示这个格子可以放东西,"#" ...
- elastic search book [ ElasticSearch book es book]
谁在使用ELK 维基百科, github都使用 ELK (ElasticSearch es book) ElasticSearch入门 Elasticsearch入门,这一篇就够了==>http ...