codeforces

Cythia-18 天前
数据结构·python·算法·codeforces
Codeforces Round 954 (Div. 3) A B C DYou are given three points with integer coordinates x 1 x_1 x1, x 2 x_2 x2, and x 3 x_3 x3 on the X X X axis ( 1 ≤ x i ≤ 10 1 \leq x_i \leq 10 1≤xi≤10). You can choose any point with an integer coordinate a a a on the X X X axis. Note that the point a a a
ros27522925 天前
开发语言·c++·算法·codeforces
Codeforces Round 952 (Div. 4) c++题解(A-H1)这场没打,今天vp了一下,写了A-G,然后就去吃饭了!Dashboard - Codeforces Round 952 (Div. 4) - Codeforces
Code_Shark1 个月前
算法·codeforces·oi·acm-icpc
Codeforces Round 948 (Div. 2) A~D小 A A A决定用一些立方体建一座塔。一开始,塔上没有任何立方体。在一次移动中,小 A A A要么正好把 1 1 1 个立方体放到塔顶,要么正好从塔顶移走 1 1 1 个立方体。存不存在一种可能使得在走了 n n n 步之后,塔顶正好有 m m m 个立方体?
Cythia-11 个月前
c语言·数据结构·c++·算法·codeforces
Codeforces Global Round 3 C. Crazy DiamondYou are given a permutation p p p of integers from 1 1 1 to n n n, where n n n is an even number.
Enjoycola_4 个月前
c++·算法·蓝桥杯·codeforces·atcoder
Codeforces Round 935 (Div. 3)A~E有三种人,内向、外向、综合,内向必须独自一个帐篷,外向必须3个人一个帐篷,综合介于1~3人一个帐篷,我们发现非法情况只会存在外向的人凑不成3个人一个帐篷的情况,因外向不够可以向综合人借,故将二者合并并判断:
叶域4 个月前
c++·算法·codeforces
Educational Codeforces Round 163 (Rated for Div. 2) (A~C)目录:A B C标签: 暴力枚举(brute force)构造算法(constructive algorithms)
ros2752294 个月前
c++·算法·codeforces
Codeforces Round 933 (Div. 3) A~Dcodeforces.com/contest/1941直接暴力即可 ;用贪心的思路 , 这个肯定是要从前往后来遍历的 ;
叶域4 个月前
c++·算法·codeforces
Codeforces Round 933 (Div. 3) (A~E)目录:A B C D E标签: 暴力枚举(brute force)数学(math)排序算法(sortings)双指针算法(two pointers)
GordenGhost4 个月前
c++·算法·codeforces
Chip and Ribbon(Round 158)
cxy84 个月前
codeforces
21 Educational Codeforces Round 136 (Rated for Div. 2)Knowledge Cards(树状数组、set、+思维、数字华容道)最开始猜了个结论错了,猜的是必须要有\(m+n-1\)个方格空着,这样才能保证任意一张牌能从起点到终点。 其实并不是,参考数字华容道,实际上是只要除了终点和起点,以及自身这个方格。我们只需要留出一个空格就可以使任意方格移动到任意位置。 我们只需要统计一下,一个数前面比他小的数有多少个,然后取个最大值,就是最大的要使这个牌按顺序到达终点,其它牌不能到达终点的情况,这时应该时满足\(m * n-4>=mx\)所有的就都可以满足。
maisui121384 个月前
c++·算法·codeforces
Codeforces Round 929 (Div. 3)Codeforces Round 929 (Div. 3)题意:可以对整数数组进行两个操作,一是随意重新排列或保持不变,二是选择连续子段元素符号倒转,求可能最大的所有元素和。
ros2752295 个月前
算法·codeforces
Codeforces Round 928 (Div. 4) (A-E)https://codeforces.com/contest/1926遍历每一个字符串,比较1和0的数量即可,那个大输出那个;
叶域5 个月前
c++·算法·codeforces
think-cell Round 1 (A~C)目录:A B C标签: 贪心(greedy)排序(sortings)AC代码标签: 构造(constructive algorithms)数学(math)
ros2752295 个月前
算法·codeforces
Codeforces Round 925 (Div. 3)Dashboard - Codeforces Round 925 (Div. 3) - Codeforces
ros2752295 个月前
c++·算法·codeforces
Educational Codeforces Round 161 (Rated for Div. 2)(A - E)https://codeforces.com/contest/1922直接根据题意就能够发现 :遍历每一个位置 i : 如果能够发现 c[i]!=a[i] && c[i]!=b[i] , 就直接返回true;
阿史大杯茶5 个月前
c++·算法·codeforces
Codeforces Round 924 (Div. 2 ABCDE题 视频讲解)Bob has a rectangle of size a × b a \times b a×b. He tries to cut this rectangle into two rectangles with integer sides by making a cut parallel to one of the sides of the original rectangle. Then Bob tries to form some other rectangle from the two result
maisui121385 个月前
数据结构·c++·算法·codeforces
Codeforces Round 923 (Div. 3)Codeforces Round 923 (Div. 3)题意:略 思路:找最小和最大的‘B’下标即可 AC code:
Code_Shark6 个月前
算法·codeforces·oi
Codeforces Round 917 (Div. 2) A~F给出一个数组 a 1 , a 2 , . . . , a n a_1, a_2, ..., a_n a1,a2,...,an,你可以进行若干次以下操作:
maisui121386 个月前
数据结构·c++·算法·codeforces
Pinely Round 3 (Div. 1 + Div. 2)Pinely Round 3 (Div. 1 + Div. 2)题意:当前处于(0, 0)原点,给出若干个平面坐标轴上的点,是否可以仅选择三个方向便可以到达所有给出的点。
Enjoycola_7 个月前
c++·算法·蓝桥杯·codeforces·atcoder
Educational Codeforces Round 160 (Rated for Div. 2) A~C目录A. Rating Increase题目分析:B. Swap and Delete题目分析:C. Game with Multiset