排序
ltinor
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
010 Maximum Median
原题:You are given an array a of n integers, where n is odd. You can make the following operation with it:Choose one of the elements of the array (for example ai) and increase it by 1 (that is, replac...原创 2019-08-09 23:51:13 · 300 阅读 · 0 评论 -
018 Boxers (CF1203E)
题目链接:CF1203E标签:贪心、排序大意:给你n个数,每个数可一个+1,-1,或不变(变化后必须为正整数),问最多可能存在多少个不同的数思路:由大到小排序,1特判从最左边的数开始,尽量往小了变,开个数组来标记这个值是否出现过,代码如下,细节请看注释:#include<bits/stdc++.h>using namespace std;const int maxn=150...原创 2019-08-19 16:47:27 · 236 阅读 · 0 评论
分享