首页 > TAG信息列表 > Vus

CF1186D - Vus the Cossack and Numbers

传送门:Problem - 1186D - Codeforces 输入的数要么向上取整,要么向下取整,那么设ans为负数的绝对值的和,sum为正数的和,对单一的负数向下取整于负数而言相当于ans++,同理正数向上取整sum++。 这里我们设ans1为ans的最小值即负数全部向上取整,ans2为ans最大值,sum1,sum2同理 由于题目保证

ZCMU暑期训练四-E - Vus the Cossack and Strings

Vus the Cossack has two binary strings, that is, strings that consist only of “0” and “1”. We call these strings aa and bb. It is known that |b|≤|a||b|≤|a|, that is, the length of bb is at most the length of aa. The Cossack considers every substri

Codeforces Round #571 (Div. 2)

Codeforces Round #571 (Div. 2) D. Vus the Cossack and Numbers Description Vus the Cossack has nn real numbers aiai. It is known that the sum of all numbers is equal to 00. He wants to choose a sequence bb the size of which is nn such that the sum of

C. Vus the Cossack and Strings

  1 /******* 2 http://codeforces.com/contest/1186/problem/C 3 题意:给2个0,1串,a串比b串长。 4 问a串有多少个和b串等长且不同的字符个数为偶数的串。 5 思路:首先比较出a中第一个串(记为a0)和b的不同字符个数(记为ans0)。然后a中第二个串(记为a1)将不在与b比较而是与a中第一个串比较

题解 CF1186A 【Vus the Cossack and a Contest】

这题是入门难度的题目吧…… 根据题意可以得出,只有当\(m\)和\(k\)都大于等于\(n\)时,\(Vus\)才可以实现他的计划。 因此,我们不难得出以下\(AC\)代码: #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <cmath> #includ

Codeforces Round #571 (Div. 2)-D. Vus the Cossack and Numbers

Vus the Cossack has nn real numbers aiai. It is known that the sum of all numbers is equal to 00. He wants to choose a sequence bb the size of which is nn such that the sum of all numbers is 00 and each bibi is either ⌊ai⌋⌊ai⌋ or ⌈ai⌉