Live2d Test Env

01 2019 档案

摘要:B .Battle Royale 题意:给你两个点A,B,以及一个圆S,保证两个点在圆外,且其连线与圆相交,求两点间最短距离。 思路:显然是要分别与圆相切,然后在圆弧想走,直到相交。 那么ans=与圆相交的直线距离+圆弧上的距离; 前者不难求。 后者的话有些抽象,因为不知道怎么取固定角度,但是如果想 阅读全文
posted @ 2019-01-31 20:40 nimphy 阅读(795) 评论(0) 推荐(0) 编辑
摘要:整体来说,这一场的质量比较高,但是题意也有些难懂。 E.Electronic Circuit 题意: 给你N个点,M根线,问它是否是一个合法的电路。 思路: 一个合法的电路,经过一些串联并联关系,最后有一个点是正极,一个是负极,我们就来模拟这个串联的过程即可,并联的关系会因为我们使用了set而抵消, 阅读全文
posted @ 2019-01-30 19:18 nimphy 阅读(1231) 评论(0) 推荐(0) 编辑
摘要:待修莫对 序列自动机 几何积分 沈阳 M 待删除背包 ; 分组背包 K-LIS, K次二分(插到最后stop) 问题转化为LIS bzoj2131 hdu4055 最小线段覆盖环 实时路况 分治+floyd min_25筛 最小树形图 多项式 阅读全文
posted @ 2019-01-22 20:23 nimphy 阅读(187) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2019-01-19 21:58 nimphy 阅读(18) 评论(2) 推荐(0) 编辑
摘要:Little Sub has a sequence . Now he has a problem for you. Two sequences of length and of length are considered isomorphic when they meet all the follo 阅读全文
posted @ 2019-01-19 21:51 nimphy 阅读(427) 评论(0) 推荐(1) 编辑
摘要:Little Sub loves math very much, and has just come up with an interesting problem when he is working on his geometry homework. It is very kind of him 阅读全文
posted @ 2019-01-19 21:46 nimphy 阅读(520) 评论(0) 推荐(0) 编辑
摘要:Little Sub is about to take a math exam at school. As he is very confident, he believes there is no need for a review. Little Sub's father, Mr.Potato, 阅读全文
posted @ 2019-01-19 21:37 nimphy 阅读(203) 评论(0) 推荐(0) 编辑
摘要:题意:给定N个数,Q次询问,求区间最大异或和。 思路:一开始想的线性基+线段树。单次线性基合并的复杂度为20*20,结合线段树,复杂度为O(NlogN*20*20);显然,超时。 超时代码: #include<bits/stdc++.h> #define pb push_back #define r 阅读全文
posted @ 2019-01-14 12:57 nimphy 阅读(1519) 评论(0) 推荐(3) 编辑
摘要:You are given a tree consisting of n vertices. A number is written on each vertex; the number on vertex i is equal to ai . Let's denote the function g 阅读全文
posted @ 2019-01-12 10:01 nimphy 阅读(863) 评论(0) 推荐(0) 编辑
摘要:You are given an array a1,a2,…,an of integer numbers. Your task is to divide the array into the maximum number of segments in such a way that: each el 阅读全文
posted @ 2019-01-12 09:56 nimphy 阅读(540) 评论(0) 推荐(0) 编辑
摘要:Sample Input Sample Output 给定一个数字字符串S,如果一个数字字符串(只包含0-9,可以有前导0)中出现且只出现1次S,我们就称这个字符串是好的。 例如假设S=666,则1666、03660666是好的,6666、66、123不是好的;假设S=1212,则01212、121 阅读全文
posted @ 2019-01-07 18:09 nimphy 阅读(364) 评论(0) 推荐(0) 编辑
摘要:Sample Input Sample Output 小Hi有一个长度为N的字符串,这个字符串每个位置上的字符两两不同。现在小Hi可以进行一种剪切操作: 选择任意一段连续的K个字符,把这段子串剪下来,粘在串首或者串尾。例如ABCDE -> ADEBC、ABCDE -> BCADE或者ABCDE -> 阅读全文
posted @ 2019-01-07 17:08 nimphy 阅读(263) 评论(0) 推荐(0) 编辑
摘要:Alex decided to try his luck in TV shows. He once went to the quiz named "What's That Word?!". After perfectly answering the questions "How is a pseud 阅读全文
posted @ 2019-01-07 13:05 nimphy 阅读(261) 评论(0) 推荐(0) 编辑
摘要:Mitya and Vasya are playing an interesting game. They have a rooted tree with n vertices, and the vertices are indexed from 1 to n. The root has index 阅读全文
posted @ 2019-01-06 22:14 nimphy 阅读(570) 评论(0) 推荐(0) 编辑
摘要:Misha walked through the snowy forest and he was so fascinated by the trees to decide to draw his own tree! Misha would like to construct a rooted tre 阅读全文
posted @ 2019-01-06 20:23 nimphy 阅读(544) 评论(0) 推荐(0) 编辑
摘要:描述 给定 n, k,求一个最大的整数 m,使得 km 是 n! 的约数 输入 第一行两个正整数 n, k 2 ≤ n,k ≤ 109 输出 输出最大的 m 描述 给定 n, k,求一个最大的整数 m,使得 km 是 n! 的约数 输入 第一行两个正整数 n, k 2 ≤ n,k ≤ 109 输出 阅读全文
posted @ 2019-01-05 22:39 nimphy 阅读(185) 评论(0) 推荐(0) 编辑
摘要:描述 给定 n 根木棍,第 i 根长度为 ai 现在你想用他们拼成尽量多的面积大于 0 的三角形,要求每根木棍只能被用一次,且不能折断 请你求出最多能拼出几个 输入 第一行一个正整数 n 第二行 n 个正整数 a1 … an 1 ≤ n ≤ 15 1 ≤ ai ≤ 109 输出 输出最多能拼出几个三 阅读全文
posted @ 2019-01-05 22:36 nimphy 阅读(439) 评论(0) 推荐(0) 编辑
摘要:Makoto has a big blackboard with a positive integer n written on it. He will perform the following action exactly k times: Suppose the number currentl 阅读全文
posted @ 2019-01-05 10:38 nimphy 阅读(612) 评论(0) 推荐(0) 编辑
摘要:Sample Input Sample Output You are given a {1, 2, ..., n}-permutation a[1], a[2], ..., a[n]. How many pairs of integers (i, j) satisfy 1 ≤ i ≤ j ≤ n a 阅读全文
posted @ 2019-01-04 19:22 nimphy 阅读(397) 评论(0) 推荐(0) 编辑
摘要:Sample Input Sample Output Prof.Q is a sophisticated professor who has insights into quadrillions of sorting algorithms, especially into bubble sort. 阅读全文
posted @ 2019-01-04 18:38 nimphy 阅读(714) 评论(0) 推荐(0) 编辑
摘要:描述 对于一个长度为n的数列A,我们如下定义A的中位数med(A): 当n是奇数时,A的中位数是第(n+1)/2大的数;当n是偶数时,A的中位数是第n/2大的数和第n/2+1大的数的平均值。 同时,我们如下定义A的前缀中位数和: S(A) = med(B1) + med(B2) + med(B3) 阅读全文
posted @ 2019-01-03 10:50 nimphy 阅读(218) 评论(0) 推荐(0) 编辑
摘要:描述 有一个无向图,有n个点,m1条第一类边和m2条第二类边。第一类边有边权,第二类边无边权。请为第二类的每条边定义一个边权,使得第二类边可能全部出现在该无向图的最小生成树上,同时要求第二类边的边权总和尽可能大。注:第二类边不会形成环 输入 第一行三个数n,m2,m1 接下来m2行,每行两个数,描述 阅读全文
posted @ 2019-01-02 17:15 nimphy 阅读(244) 评论(0) 推荐(0) 编辑
摘要:Peterson loves to learn new languages, but his favorite hobby is making new ones. Language is a set of words, and word is a sequence of lowercase Lati 阅读全文
posted @ 2019-01-01 22:32 nimphy 阅读(300) 评论(0) 推荐(0) 编辑

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