![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
技巧
文章平均质量分 60
Hanylch
菜鸟的起飞之路
Think and Practice
展开
-
Error Curves HDU - 3714 (三分求最值)
Josephina is a clever girl and addicted to Machine Learning recently. She pays much attention to a method called Linear Discriminant Analysis, which has many interesting properties. In order to t原创 2017-04-12 15:21:14 · 302 阅读 · 0 评论 -
Pearls in a Row CodeForces - 620C
There are n pearls in a row. Let’s enumerate them with integers from 1 to n from the left to the right. The pearl number i has the type ai.Let’s call a sequence of consecutive pearls a segment. Let’s c原创 2017-05-18 21:37:16 · 333 阅读 · 0 评论 -
Not Equal on a Segment CodeForces - 622C (思维)
You are given array a with n integers and m queries. The i-th query is given with three integers li, ri, xi.For the i-th query find any position pi (li ≤ pi ≤ ri) so that api ≠ xi.Input The first line原创 2017-05-18 21:34:15 · 252 阅读 · 0 评论 -
Bi-shoe and Phi-shoe LightOJ - 1370(欧拉函数+技巧)
Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so he asked his assistant Bi-Shoe to go原创 2017-04-27 21:39:41 · 262 阅读 · 0 评论 -
中位数计数 (思维 + 技巧)
中位数计数Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1610 Accepted Submission(s): 583Problem Description 中位数定义为所有值从小到大排序后排在正中间的那个数,如果值有偶数个原创 2017-05-17 20:05:15 · 382 阅读 · 0 评论 -
Longest k-Good Segment CodeForces - 616D (尺取法)
The array a with n integers is given. Let's call the sequence of one or more consecutive elements in a segment. Also let's call the segment k-good if it contains no more than k different values.Find an原创 2017-05-16 23:54:28 · 311 阅读 · 0 评论 -
Hard Process CodeForces - 660C (尺取法)
You are given an array a with n elements. Each element of a is either 0 or 1.Let’s denote the length of the longest subsegment of consecutive elements in a, consisting of only numbers one, as f(a). You原创 2017-05-25 21:38:33 · 500 阅读 · 0 评论 -
The Smallest String Concatenation CodeForces - 632C (string sort)
You’re given a list of n strings a1, a2, …, an. You’d like to concatenate them together in some order such that the resulting string would be lexicographically smallest.Given the list of strings, outpu原创 2017-05-23 21:21:37 · 297 阅读 · 0 评论 -
Ada and Cycle SPOJ - ADACYCLE (bfs + 剪枝)
Ada the Ladybug is on a trip in Bugindia. There are many cities and some uni-directional roads connecting them. Ada is wondering about the shortest path, which begins in a city and ends in the same cit原创 2017-04-19 21:48:38 · 613 阅读 · 0 评论 -
三分·三分求极值 HihoCoder - 1142
描述这一次我们就简单一点了,题目在此: week40_1.PNG 在直角坐标系中有一条抛物线y=ax^2+bx+c和一个点P(x,y),求点P到抛物线的最短距离d。 提示:三分法× 提示:三分法在之前的几周中我们了解到二分法作为分治中最常见的方法,适用于单调函数,逼近求解某点的值。 但当函数是凸形函数时,二分法就无法适用,这时就需要用到三分法。 从三分法的名字中我们可以猜到,三分法是原创 2017-04-12 20:44:34 · 429 阅读 · 0 评论 -
Optimal Number Permutation CodeForces - 622D (找规律)
You have array a that contains all integers from 1 to n twice. You can arbitrary permute any numbers in a.Let number i be in positions xi, yi (xi < yi) in the permuted array a. Let’s define the value d原创 2017-05-18 21:39:31 · 305 阅读 · 0 评论