
思维
文章平均质量分 87
免费的单身汉RainsdRop
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #694 (Div. 2)_B. Strange List(规律)
链接:https://codeforces.com/problemset/problem/1471/B题目You have given an array a of length n and an integer x to a brand new robot. What the robot does is the following: it iterates over the elements of the array, let the current element be q. If q is divi原创 2021-01-06 13:43:31 · 574 阅读 · 1 评论 -
CodeForces - 977D:Divide by three, multiply by two
题目Polycarp likes to play with numbers. He takes some integer number x, writes it down on the board, and then performs with it n−1 operations of the two kinds:divide the number x by 3 (x must be divisible by 3);multiply the number x by 2.After each op原创 2020-12-17 22:40:10 · 296 阅读 · 0 评论 -
CodeForces - 977C:Less or Equal(思维)
链接:https://vjudge.net/problem/CodeForces-977C题目You are given a sequence of integers of length n and integer number k. You should print any integer number x in the range of [1;10^9] (i.e. 1≤x≤10^9) such that exactly k elements of given sequence are less t原创 2020-12-16 22:49:21 · 350 阅读 · 0 评论 -
CodeForces - 976A:Minimum Binary Number(水题)
链接:https://vjudge.net/problem/CodeForces-976A题目String can be called correct if it consists of characters “0” and “1” and there are no redundant leading zeroes. Here are some examples: “0”, “10”, “1001”.You are given a correct string s.You can perform t原创 2020-12-12 22:43:58 · 211 阅读 · 0 评论 -
牛客小白月赛30_E:牛牛的加法(思维)
链接:https://ac.nowcoder.com/acm/contest/9667/E题目牛牛经常在数学课上睡觉,所以他的数学非常烂。别人的数学都是进位加法, 但是他的却是非进位加法,比如 7+7 = 4, 22+84 = 6现在牛牛想考验你一下, 给你两个非常大的数,计算他们的和。输入第一行一个整数 a ( a ≥ 0 and |a| ≤ 2e5);第二行一个整数 b ( b ≥ 0 and |b| ≤ 2e5);输出输出一个数 c , c = a + b思路状态不佳,在最后原创 2020-12-05 22:27:52 · 587 阅读 · 0 评论 -
Codeforces965—A:Paper Airplanes(思维)
链接:Codeforce965—A题传送门题目To make a paper airplane, one has to use a rectangular piece of paper. From a sheet of standard size you can make s airplanes.A group of k people decided to make n airplanes each. They are going to buy several packs of paper, each原创 2020-11-30 22:29:38 · 310 阅读 · 0 评论 -
牛客练习赛73_B:遥远的记忆
链接:https://ac.nowcoder.com/acm/contest/9033/B思路A题真的就属于看懂而就是A不掉,总是缺点什么。不过机(F)智(W)如我,很快啊,我就把罪恶的眼光看向了B题。B题就很有趣了,题意十分清楚,就是依据题中给出的规则,最多能够得到几个不同的数字。不同的数字是这个题的关键,怎么才会形成不同的数字就是我们要考虑的。我们首先考虑C1是0的时候,由于题目中是这样说的:如果c_i = 0,并且 i>1 ,那么a_i = a_{i-1}。所以我们可以得到,原创 2020-11-22 22:13:36 · 203 阅读 · 0 评论 -
CodeForces - 960B:Minimize the error(优先队列+贪心)
链接:https://vjudge.net/problem/CodeForces-960B题意输入第一行的三个数字分别代表:n(每组各有n个数字,共有2组),k1(对第一组的操作次数),k2(对第二组的操作次数)。所谓操作就是对一个数字进行 +1 或 -1 。操作k1+k2次之后对两个数组进行以下操作:for(int i=0;i<n;i++) sum+=(a[i]-b[i])*(a[i]-b[i]);求这个sum的最小值。思路状态不是很好,主要是自己作了一个死(没想到会出现那原创 2020-11-20 19:46:54 · 265 阅读 · 2 评论 -
CodeForces - 960A:Check the string(思维)
题目A has a string consisting of some number of lowercase English letters ‘a’. He gives it to his friend B who appends some number of letters ‘b’ to the end of this string. Since both A and B like the characters ‘a’ and ‘b’, they have made sure that at this原创 2020-11-19 22:45:35 · 154 阅读 · 0 评论 -
CodeForces-950_A:Left-handers, Right-handers and Ambidexters(思维)
链接:https://vjudge.net/problem/CodeForces-950A题意现在有一场保龄球比赛,教练需要组建一支人数为偶数的队伍。现在教练手上有l个左撇子选手,r个右撇子选手,a个全能人(两只手都可以用)。现在教练希望他的队伍里用左手的人数等于用右手的人数。问你这支队伍最多能有多少人?队伍里可能一个都没有(这个情况允许存在)。思路CF比赛的前2~3个题一般来说都是思维题,基本上有想法就能过。(所以我经常死在没想法的路上/(ㄒoㄒ)/)首先我们考虑左撇子右撇子一样多,那原创 2020-11-14 22:26:20 · 220 阅读 · 0 评论