![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CF
文章平均质量分 75
年轻过成了秃顶
这个作者很懒,什么都没留下…
展开
-
B. Ehab and subtraction
题目描叙:You’re given an array aa. You should repeat the following operation kk times: find the minimum non-zero element in the array, print it, and then subtract it from all the non-zero elements of the...原创 2018-12-16 18:18:41 · 171 阅读 · 0 评论 -
C. Prime Swaps(暴力+贪心)
题目链接:http://codeforces.com/problemset/problem/432/CYou have an array a[1], a[2], …, a[n], containing distinct integers from 1 to n. Your task is to sort this array in increasing order with the follow...原创 2019-08-07 08:13:19 · 173 阅读 · 0 评论 -
C. Electrification
题目链接: http://codeforces.com/contest/1175/problem/C分析:这个题数据范围比较大。所以暴力一定不可以。我们可以先想一个简单一点的序列。给你一个n个数的序列。k = n - 1。那么这样的话,最优解一定是最小值+ 最大值 的一半。这样可以使这个b序列的第n个值最小(想一下就清楚了)。然后我们就可以利用尺取得方法每次考虑(k+1)的长度的序列,每次求...原创 2019-06-06 00:59:28 · 288 阅读 · 0 评论 -
A - Triangle(三角形+暴力)
题目链接:http://codeforces.com/problemset/problem/18/A分析:这个题操作难度还是比较小的。 不过我们要熟知三角形的有关公式。第一: 直角三角形的有关判断。 勾股定理 。第二:三角形的面积怎么求1,知三角坐标求面积:如A(X1,Y1) B(X2,Y2) C(X3,Y3)则S=(1/2)*(x1y2+x2y3+x3y1-x1y3-x2y1-x...原创 2019-04-15 10:28:44 · 1125 阅读 · 0 评论 -
C - Median(166C 思维+ 二分)
题目描述:A median in an array with the length of n is an element which occupies position number after we sort the elements in the non-decreasing order (the array elements are numbered starting with 1). ...原创 2019-04-16 13:33:39 · 340 阅读 · 0 评论 -
B. Nirvana(思维+坑点)
题目描述:Kurt reaches nirvana when he finds the product of all the digits of some positive integer. Greater value of the product makes the nirvana deeper.Help Kurt find the maximum possible product of d...原创 2019-04-12 19:52:11 · 300 阅读 · 0 评论 -
F. Graph Without Long Directed Paths
题目描述:You are given a connected undirected graph consisting of n vertices and medges. There are no self-loops or multiple edges in the given graph.You have to direct its edges in such a way that the...原创 2019-04-01 20:16:35 · 477 阅读 · 0 评论 -
B. Preparation for International Women's Day
题目描述:International Women’s Day is coming soon! Polycarp is preparing for the holiday.There are nn candy boxes in the shop for sale. The ii-th box contains didi candies.Polycarp wants to prepare the...原创 2019-03-08 13:27:19 · 345 阅读 · 0 评论 -
F1. Spanning Tree with Maximum Degree
题目描述:You are given an undirected unweighted connected graph consisting of nn vertices and mm edges. It is guaranteed that there are no self-loops or multiple edges in the given graph.Your task is to...原创 2019-03-08 12:59:36 · 469 阅读 · 0 评论 -
D. Zero Quantity Maximization(CF: Codeforces Round #544 (Div. 3))
题目描述:You are given two arrays aa and bb, each contains nn integers.You want to create a new array cc as follows: choose some real (i.e. not necessarily integer) number dd, and then for every i∈[1,n]...原创 2019-03-08 12:47:30 · 309 阅读 · 0 评论 -
F - Christmas Spruce
题目描叙:Consider a rooted tree. A rooted tree has one special vertex called the root. All edges are directed from the root. Vertex u is called a child of vertex v and vertex v is called a parent of vert...原创 2018-12-30 20:28:46 · 224 阅读 · 0 评论 -
D. Prefixes and Suffixes(KMP+dp)
参考博客:https://blog.csdn.net/huanghongxun/article/details/53209004题目链接:http://codeforces.com/problemset/problem/432/DYou have a string s = s1s2…s|s|, where |s| is the length of string s, and si its i-...原创 2019-08-07 10:11:17 · 590 阅读 · 1 评论