07 2018 档案
杭电多校第三场 A Ascending Rating
摘要:Problem Description Before the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled by 1 to n from left to right.
阅读全文
HihoCoder - 1483 区间最值
摘要:给定n个数A1...An,小Ho想了解AL..AR中有多少对元素值相同。小Ho把这个数目定义为区间[L,R]的价值,用v[L,R]表示。 例如1 1 1 2 2这五个数所组成的区间的价值为4。 现在小Ho想知道在所有的的v[L,R](1 <= L <= R <= n)中,第k小的值是多少。 Inpu
阅读全文
POJ - 2823 Sliding Window (滑动窗口入门)
摘要:An array of size n ≤ 10 6 is given to you. There is a sliding window of size kwhich is moving from the very left of the array to the very right. You c
阅读全文
牛客多校第四场 A Ternary String
摘要:题目描述 A ternary string is a sequence of digits, where each digit is either 0, 1, or 2. Chiaki has a ternary string s which can self-reproduce. Every se
阅读全文
POJ 1284 Primitive Roots
摘要:Primitive Roots We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (x i mod p) | 1 <= i <= p-1 } is equ
阅读全文
POJ 2407 Relatives(欧拉函数入门题)
摘要:Relatives Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if
阅读全文
欧拉函数解析
摘要:讲解了欧拉函数和一些模板的使用 https://www.cnblogs.com/PJQOOO/p/3875545.html 欧拉定理: 如果a与n互质的话,那就有a的n的欧拉数次方取余n等于1 缩系:就是由一个n,(1,n-1)内的所有和n互质的数组成的组合 原根:如果一个数的(0,m欧拉数-1)内
阅读全文
牛客多校第四场 F Beautiful Garden
摘要:链接:https://www.nowcoder.com/acm/contest/142/F来源:牛客网 题目描述 There's a beautiful garden whose size is n x m in Chiaki's house. The garden can be partition
阅读全文
牛客多校第四场 G Maximum Mode
摘要:链接:https://www.nowcoder.com/acm/contest/142/G来源:牛客网 The mode of an integer sequence is the value that appears most often. Chiaki has n integers a1,a2,
阅读全文
牛客练习赛 23 C 托米的位运算
摘要:链接:https://www.nowcoder.com/acm/contest/156/C来源:牛客网 托米完成了1317的上一个任务,十分高兴,可是考验还没有结束 说话间1317给了托米 n 个自然数 a1... an, 托米可以选出一些带回家,但是他选出的数需要满足一些条件 设托米选出来了k 个
阅读全文
牛客多校第二场 G transform
摘要:链接:https://www.nowcoder.com/acm/contest/140/G White Cloud placed n containers in sequence on a axes. The i-th container is located at x[i] and there a
阅读全文
牛客第三场多校 E Sort String
摘要:链接:https://www.nowcoder.com/acm/contest/141/E来源:牛客网 Eddy likes to play with string which is a sequence of characters. One day, Eddy has played with a
阅读全文
牛客第三场多校 H Diff-prime Pairs
摘要:链接:https://www.nowcoder.com/acm/contest/141/H来源:牛客网 Eddy has solved lots of problem involving calculating the number of coprime pairs within some rang
阅读全文
牛客第二场 J farm
摘要:White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The plant in the j-th column of the i-th row belongs the
阅读全文
树状数组之二维树状数组
摘要:一,二维树状数组之单点修改矩阵查询 我们坐标轴也有一维二维,就是在线得基础上扩展到平面 我们的树状数组也是一样的道理,一维的时候我们存的是一个区间的和 二维就是存的一个矩阵 https://blog.csdn.net/qq_39553725/article/details/76696168 http
阅读全文
树状数组之区间修改单点查询
摘要:树状数组的区间修改单点查询 树状数组其实本质还单点修改区间查询,但是我们怎么延伸到这个呢,我们建立一个差分数组, 比如: a[10]={4, 6, 7, 5, 1, 6, 3, 4, 2, 7} 对应的差分数组 c[10]={4, 2,1,-2,-4, 5,-3, 1,-2, 5} c[i]=a[i
阅读全文
树状数组介绍
摘要:一,前言 之前只会树状数组的一个区间求和,还是记得模板,这次在多校遇到一个用二维树状数组的题,就决心好好把树状数组搞一下,就发现树状数组有很多骚操作。 二,应用 1.树状数组的单点修改区间查询 这个是最常见的树状数组,我们很多书很多博客都是以这个作介绍,下面我也给大家讲一下,首先树状数组也是基于二分
阅读全文
ACM~离线莫队算法
摘要:【莫队算法】 ·莫队算法被大家称为“优雅的暴力” ·排序巧妙优化复杂度,带来NOIP前的最后一丝宁静。几个活蹦乱跳的指针的跳跃次数,决定着莫队算法的优劣…… ·目前的题型概括为三种:普通莫队,树形莫队以及带修莫队。 照常在这引用两篇我学习莫队的博客 https://www.cnblogs.com/P
阅读全文
数据结构~trie树(字典树)
摘要:1、概述 Trie树,又称字典树,单词查找树或者前缀树,是一种用于快速检索的多叉树结构,如英文字母的字典树是一个26叉树,数字的字典树是一个10叉树。 我理解字典树是看了这位大佬博客。还不了解字典树的可以先进去学习一下 https://www.cnblogs.com/TheRoadToTheGold
阅读全文
Codeforces Round #495 (Div. 2) B
摘要:题目链接:http://codeforces.com/contest/1004/problem/B B. Sonya and Exhibition time limit per test 1 second memory limit per test 256 megabytes input stand
阅读全文
比赛题目中不认识的单词(自己要一个礼拜来看一次)
摘要:coordinates 坐标 meansure 措施 per 每 gather 收集 contain 包含 current 最近的 consider 考虑 correct 改正,收集 absolute 绝对的 relative 相关的 formal 正规的 hold 保存,有效的, achieve
阅读全文
牛客练习赛22 简单瞎搞题(bitset优化dp)
摘要:一共有 n个数,第 i 个数是 xi xi 可以取 [li , ri] 中任意的一个值。 设 ,求 S 种类数。 一共有 n个数,第 i 个数是 xi xi 可以取 [li , ri] 中任意的一个值。 输入描述: 输出描述: 示例1 输入 复制 5 1 2 2 3 3 4 4 5 5 6 输出 复
阅读全文
Domination(概率DP)
摘要:Domination 题目链接:https://odzkskevi.qnssl.com/9713ae1d3ff2cc043442f25e9a86814c?v=1531624384 Edward is the headmaster of Marjar University. He is enthusi
阅读全文
hdu 5228 OO’s Sequence(单独取数算贡献)
摘要:Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) sa
阅读全文
Codeforces Round #496 (Div. 3 ) E1. Median on Segments (Permutations Edition)(中位数计数)
摘要:E1. Median on Segments (Permutations Edition) time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard o
阅读全文
CodeForces ~ 996
摘要:Allen has a LOT of money. He has nn dollars in the bank. For security reasons, he wants to withdraw it in cash (we will not disclose the reasons here)
阅读全文
|