![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
错题集
蒟蒻142857
这个作者很懒,什么都没留下…
展开
-
codeforces A. Zoning Restrictions Again
codeforces A. Zoning Restrictions Again ou are planning to build housing on a street. There are n spots available on the street on which you can build a house. The spots are labeled from 1 to n from l...原创 2019-05-08 09:08:46 · 360 阅读 · 0 评论 -
水题Eating Soup
A. Eating Soup time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The three frie...原创 2019-05-10 02:24:52 · 499 阅读 · 0 评论 -
A. Serval and Bus
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output It is raining heavily. But this is the first day ...原创 2019-04-14 00:16:10 · 129 阅读 · 0 评论 -
Codeforces Global Round 3:B. Born This Way
Born This Way 原文链接:传送门 Examples input 4 5 1 1 2 1 3 5 7 1 2 3 9 10 output 11 input 2 2 4 4 2 1 10 10 20 output -1 input 4 3 2 3 1 1 999999998 999999999 1000000000 3 4 100000000...原创 2019-06-02 11:01:37 · 161 阅读 · 0 评论 -
Codeforces Round #563 (Div. 2)B;Ehab Is an Odd Person
原文链接:任意门 Input The first line contains an integer n (1≤n≤10^5) — the number of elements in the array a。 The second line contains n space-separated integers a1, a2, …, an (1≤ai≤10^9) — the elements of ...原创 2019-06-04 01:20:58 · 136 阅读 · 0 评论 -
Codeforces Round #563 (Div. 2)C. Ehab and a Special Coloring Problem
原文链接:传送门 You’re given an integer n. For every integer i from 2 to n, assign a positive integer ai such that the following conditions hold: For any pair ...原创 2019-06-04 19:37:00 · 112 阅读 · 0 评论 -
Codeforces Round #567 (Div. 2) A.Chunga-Changa
原文链接:传送 代码: #include"algorithm" #include"iostream" #include"cmath" using namespace std; long long x,y,z,ans; int main(){ while(cin>>x>>y>>z){ ans=0; long long s=0,i=0,j=0...原创 2019-06-16 20:13:25 · 173 阅读 · 0 评论 -
Codeforces Round #569 (Div. 2) B. Nick and Array
原文链接:别点我我怕疼 题意:给你n个数,你要进行一次或者多次操作(操作的方式a[i]=-a[i]-1),让它们的乘积最大,当然也可以不进行操作,答案有多组。 思路:根据(操作的方式a[i]=-a[i]-1),我们发现,正数进行操作后,绝对值变大了,那么想让全部数乘积最大,就让这组数全变成负数(是不是好奇,如果存在0的问题,0进行操作可以变为(-1)),然后判断个数n的奇偶,偶数就直接输出,奇数的...原创 2019-06-22 10:37:41 · 239 阅读 · 0 评论 -
Codeforces Round #570 (Div. 3) B. Equalize Prices
原文链接别点我 题意:进行Q组测试,在每组中有长度为n的数组a[i],然后现在给你一个K,问你找到一个bi使得|ai-bi|<=k并且bi最大。如果找不到,就输出-1. 思路:这个也就关系到,最大值max,最小值min,和K,至于中间的数,我们不用去管,现在一个排序,如果max-min<=2k,那么就输出min+k,否者就输出-1。(为什么要在2k的范围找???想想看) 代码: #in...原创 2019-06-27 02:48:57 · 282 阅读 · 0 评论