Live2d Test Env

01 2018 档案

摘要:描述 小Hi喜欢大,而小Ho喜欢小。他们所在的城市(视为二维平面)有N座法阵。现在他们各选三座法阵,以三座法阵为顶点组成三角形,并站在所选三角形的重心位置;二人选择的法阵可以有相同的。小Hi选择面积最大的三角形,小Ho选择面积最小的三角形。若有多个面积相同且符合他们要求的三角形,小Hi选择重心横坐标 阅读全文
posted @ 2018-01-20 15:06 nimphy 阅读(365) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/ACdreamers/article/details/25049767 https://www.cnblogs.com/liuweimingcprogram/p/5877411.html 做此题的时候遇到这么个东西,感觉挺有意思的,先把此题做了再回来填坑。 阅读全文
posted @ 2018-01-16 17:16 nimphy 阅读(126) 评论(0) 推荐(0) 编辑
摘要:1,poj 1151 Atlantis: 求矩形面积并。 2,poj 1177 Picture: 求矩形轮廓的周长。 3,poj 1389 Area of Simple Polygons :同第一题。 4,poj 1823 Hotel :线段树线段的插入删除求线段树中最长的线段长度 5,poj 21 阅读全文
posted @ 2018-01-16 12:40 nimphy 阅读(373) 评论(0) 推荐(0) 编辑
摘要:You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer weight. We will ask you to perform the following 阅读全文
posted @ 2018-01-15 10:25 nimphy 阅读(320) 评论(0) 推荐(0) 编辑
摘要:我们在用二维树状数组的时候,可以得到一个边与坐标轴平行的矩形内点集的信息。 如果我们需要得到得到到一个点的距离小于等于K的点的信息呢。这些点构成的不在是边也坐标轴平行的矩形,而是一个对角线与坐标轴平行的菱形。 可以通过转化,使得整个坐标轴旋转45°,然后我们菱形变成了方方正正的矩形,又可以用而二维树 阅读全文
posted @ 2018-01-13 10:57 nimphy 阅读(577) 评论(0) 推荐(0) 编辑
摘要:树上的有些问题是可以用树剖或者动态树解决的,但是他们有一个动同点就是:不连通。 比如求u到v的路径权值和,或者最大值: u到v可能对应了多个链,这多个链在对应的数据结构(假设是线段树)上面对应不同的区间。但是线段树上这几个区间的不连续并不影响我们得到答案。 (当然求子树的信息话是连续区间) 那么如果 阅读全文
posted @ 2018-01-12 13:27 nimphy 阅读(3692) 评论(0) 推荐(1) 编辑
摘要:给定一棵N个节点的树,编号1~N。其中1号节点是根,并且第i个节点的权值是Vi。 针对这棵树,小Hi会询问小Ho一系列问题。每次小Hi会指定一个节点x,询问小Ho以x为根的子树中,最小的权值是多少。为了增加难度,小Hi可能随时改变其中每个节点的权值。 你能帮助小Ho准确、快速的回答小Hi的问题吗? 阅读全文
posted @ 2018-01-10 21:04 nimphy 阅读(438) 评论(0) 推荐(0) 编辑
摘要:You are given a sequence A[1], A[2], ..., A[N]. (0 ≤ A[i] < 231, 1 ≤ N ≤ 12000). A query is defined as follows: Query(x,y) = Max { a[i] xor a[i+1] xor 阅读全文
posted @ 2018-01-10 11:31 nimphy 阅读(459) 评论(1) 推荐(0) 编辑
摘要:In an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p: ⊕ is the xor operator. We say a path the 阅读全文
posted @ 2018-01-09 16:33 nimphy 阅读(570) 评论(0) 推荐(1) 编辑
摘要:一:解决XOR常用的方法: 在vjudge上面输入关键词xor,然后按照顺序刷了一些题。 然后大概悟出了一些的的套路: 我是分界线 POJ 3764: The xor-longest 字典树求最大异或 POJ 3764: The xor-longest 字典树求最大异或 #include<cmath 阅读全文
posted @ 2018-01-08 21:47 nimphy 阅读(601) 评论(0) 推荐(0) 编辑
摘要:Zeus 和 Prometheus 做了一个游戏,Prometheus 给 Zeus 一个集合,集合中包含了N个正整数,随后 Prometheus 将向 Zeus 发起M次询问,每次询问中包含一个正整数 S ,之后 Zeus 需要在集合当中找出一个正整数 K ,使得 K 与 S 的异或结果最大。Pr 阅读全文
posted @ 2018-01-08 20:53 nimphy 阅读(563) 评论(0) 推荐(0) 编辑
摘要:You have two integers L and R, and you are required to find the max xor value of a and b where L <= a <= R and L <= b <= R Input Two integers in a lin 阅读全文
posted @ 2018-01-08 19:58 nimphy 阅读(358) 评论(0) 推荐(0) 编辑
摘要:更多Bitset的运用,请看这里http://www.cnblogs.com/hua-dong/p/8519739.html。 由于在学cdq分治,看到了这道题。先来看一道题目 (hihocoder1513): 问题:给出每个人(n<=100000)的五门学科成绩,求出所有人:五门学科名次都比自己靠 阅读全文
posted @ 2018-01-06 11:23 nimphy 阅读(1264) 评论(6) 推荐(1) 编辑
摘要:Anton likes permutations, especially he likes to permute their elements. Note that a permutation of n elements is a sequence of numbers {a1, a2, ...,  阅读全文
posted @ 2018-01-05 20:55 nimphy 阅读(440) 评论(0) 推荐(0) 编辑
摘要:Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by a pair li and ri and asks you to count the 阅读全文
posted @ 2018-01-05 17:32 nimphy 阅读(278) 评论(0) 推荐(0) 编辑
摘要:Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= 阅读全文
posted @ 2018-01-05 15:15 nimphy 阅读(820) 评论(0) 推荐(0) 编辑
摘要:You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number 阅读全文
posted @ 2018-01-05 14:07 nimphy 阅读(278) 评论(0) 推荐(0) 编辑
摘要:Byteotian Interstellar Union (BIU) has recently discovered a new planet in a nearby galaxy. The planet is unsuitable for colonisation due to strange m 阅读全文
posted @ 2018-01-04 17:58 nimphy 阅读(304) 评论(0) 推荐(0) 编辑
摘要:Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares fo 阅读全文
posted @ 2018-01-03 21:30 nimphy 阅读(437) 评论(0) 推荐(1) 编辑
摘要:描述 给定一个字符串S,小Hi希望对S进行K次翻转操作。 每次翻转小Hi会指定两个整数Li和Ri,表示要将S[Li..Ri]进行翻转。(S下标从0开始,即S[0]是第一个字母) 例如对于S="abcdef",翻转S[2..3] 得到S="abdcef";再翻转S[0..5]得到S="fecdba"。 阅读全文
posted @ 2018-01-02 23:38 nimphy 阅读(957) 评论(0) 推荐(0) 编辑
摘要:描述 小Ho:好麻烦啊~~~~~ 小Hi:小Ho你在干嘛呢? 小Ho:我在干活啊!前几天老师让我帮忙管理一下团队的人员,但是感觉好难啊。 小Hi:说来听听? 小Ho:事情是这样的。我们有一个运动同好会,每天都有人加入或者退出,所以老师让我帮忙管理一下人员。每个成员有一个互不相同的id和他对我们同好会 阅读全文
posted @ 2018-01-02 20:47 nimphy 阅读(743) 评论(0) 推荐(0) 编辑
摘要:。好繁琐的说 阅读全文
posted @ 2018-01-02 17:56 nimphy 阅读(161) 评论(0) 推荐(0) 编辑
摘要:网上有许多题,就是给定一个序列,要你支持几种操作:A、B、C、D。一看另一道题,又是一个序列 要支持几种操作:D、C、B、A。尤其是我们这里的某人,出模拟试题,居然还出了一道这样的,真是没技术含量……这样 我也出一道题,我出这一道的目的是为了让大家以后做这种题目有一个“库”可以依靠,没有什么其他的意 阅读全文
posted @ 2018-01-01 21:41 nimphy 阅读(224) 评论(0) 推荐(0) 编辑
摘要:数学期望 P=Σ每一种状态*对应的概率。 因为不可能枚举完所有的状态,有时也不可能枚举完,比如抛硬币,有可能一直是正面,etc。在没有接触数学期望时看到数学期望的题可能会觉得很阔怕(因为我高中就是这么认为的,对不起何老板了QwQ),避之不及。 但是现在发现大多数题就是手动找公式或者DP推出即可,只要 阅读全文
posted @ 2018-01-01 08:55 nimphy 阅读(23709) 评论(3) 推荐(15) 编辑
摘要:However, all efforts to decode their messages have failed so far because, as luck would have it, they have stumbled upon a race of stuttering aliens! 阅读全文
posted @ 2018-01-01 08:04 nimphy 阅读(296) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示