摘要:Codeforces Round #575 (Div. 3) D1 - RGB Substring (easy version) The only difference between easy and hard versions is the size of the input. You are
阅读全文
摘要:Codeforces Round #575 (Div. 3) C - Robot Breakout n robots have escaped from your laboratory! You have to find them as soon as possible, because these
阅读全文
摘要:Codeforces Round #575 (Div. 3) B - Odd Sum Segments You are given an array a consisting of n integers a1,a2,…,an. You want to split it into exactly k
阅读全文
摘要:Codeforces Round #575 (Div. 3) A - Three Piles of Candies Alice and Bob have received three big piles of candies as a gift. Now they want to divide th
阅读全文
摘要:Educational Codeforces Round 69 (Rated for Div. 2) C - Array Splitting You are given a sorted array a1,a2,…,an (for each index i>1 condition ai≥ai−1 h
阅读全文
摘要:Educational Codeforces Round 69 (Rated for Div. 2) B - Pillars There are n pillars aligned in a row and numbered from 1 to n. Initially each pillar co
阅读全文
摘要:Educational Codeforces Round 69 (Rated for Div. 2) A - DIY Wooden Ladder Let's denote a k-step ladder as the following structure: exactly k+2 wooden p
阅读全文
摘要:Codeforces Round #573 (Div. 2) C - Tokitsukaze and Discard Items Recently, Tokitsukaze found an interesting game. Tokitsukaze had n items at the begin
阅读全文
摘要:Codeforces Round #573 (Div. 2) B - Tokitsukaze and Mahjong Tokitsukaze is playing a game derivated from Japanese mahjong. In this game, she has three
阅读全文
摘要:Codeforces Round #573 (Div. 2) A. Tokitsukaze and Enhancement Tokitsukaze is one of the characters in the game "Kantai Collection". In this game, ever
阅读全文
摘要:Codeforces Round #569 (Div. 2) A. Alex and a Rhombus While playing with geometric figures Alex has accidentally invented a concept of a n-th order rho
阅读全文
摘要:Codeforces Round #569 (Div. 2) B. Nick and Array Nick had received an awesome array of integers a=[a1,a2,…,an] as a gift for his 5 birthday from his m
阅读全文
摘要:Codeforces Round #569 (Div. 2) C. Valeriy and Deque Recently, on the course of algorithms and data structures, Valeriy learned how to use a deque. He
阅读全文
摘要:Codeforces Round #567 (Div. 2) B. Split a Number Dima worked all day and wrote down on a long paper strip his favorite number n consisting of l digits
阅读全文
摘要:Codeforces Round #565 (Div. 3) E. Cover it! You are given an undirected unweighted connected graph consisting of n vertices and m edges. It is guarant
阅读全文
摘要:Codeforces Round #565 (Div. 3) C. Lose it! You are given an array a consisting of n integers. Each ai is one of the six following numbers: 4,8,15,16,2
阅读全文
摘要:Codeforces Round #565 (Div. 3) B. Merge it! You are given an array aa consisting of nn integers a1,a2,…,an. In one operation you can choose two elemen
阅读全文
摘要:Codeforces Round #565 A. Divide it! You are given an integer n. You can perform any of the following operations with this number an arbitrary (possibl
阅读全文
摘要:C. News Distribution C. News Distribution Example input 7 5 3 2 5 4 0 2 1 2 1 1 2 6 7 output 4 4 1 4 4 2 2 思路:简单来讲,就是用并查集求每个点所在连通块的大小,有两种写法......写法一:用
阅读全文