
错题集
蒟蒻142857
这个作者很懒,什么都没留下…
展开
-
codeforces A. Zoning Restrictions Again
codeforcesA. Zoning Restrictions Againou 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 · 813 阅读 · 0 评论 -
水题Eating Soup
A. Eating Souptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output The three frie...原创 2019-05-10 02:24:52 · 893 阅读 · 0 评论 -
A. Serval and Bus
time limit per test1 second memory limit per test256 megabytesinputstandard inputoutputstandard outputIt is raining heavily. But this is the first day ...原创 2019-04-14 00:16:10 · 158 阅读 · 0 评论 -
Codeforces Global Round 3:B. Born This Way
Born This Way 原文链接:传送门Examplesinput4 5 1 1 21 3 5 71 2 3 9 10output11input2 2 4 4 21 1010 20output-1input4 3 2 3 11 999999998 999999999 10000000003 4 100000000...原创 2019-06-02 11:01:37 · 200 阅读 · 0 评论 -
Codeforces Round #563 (Div. 2)B;Ehab Is an Odd Person
原文链接:任意门InputThe 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 · 180 阅读 · 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 · 158 阅读 · 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 · 225 阅读 · 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 · 292 阅读 · 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 · 335 阅读 · 0 评论