CF1388B-Captain Flint and a Long Voyage 题目: 题目描述: Captain Flint and his crew keep heading to a savage shore of Byteland for several months already, drinking rum and telling stories. In such moments uncle Bogdan often remembers his nephew Denis. Today, he has told a story about how Denis helped him to come up with an interesting problem and asked the crew to solve
CF1388A-Captain Flint and Crew Recruitment 题目: 题目描述: Despite his bad reputation, Captain Flint is a friendly person (at least, friendly to animals). Now Captain Flint is searching worthy sailors to join his new crew (solely for peaceful purposes). A sailor is considered as worthy if he can solve Flint’s task. Recently, out of blue Captain Flint has been interested in math and even defined
CF1393E2-Twilight and Ancient Scroll (harder version) 题目: 题目描述: This is a harder version of the problem E with larger constraints. Twilight Sparkle has received a new task from Princess Celestia. This time she asked to decipher the ancient scroll containing important knowledge of pony origin. To hide the crucial information from evil eyes, pony elders cast a spell on the scroll. That spell adds
CF1393E1-Twilight and Ancient Scroll (easier version) 题目: 题目描述: This is an easier version of the problem E with smaller constraints. Twilight Sparkle has received a new task from Princess Celestia. This time she asked to decipher the ancient scroll containing important knowledge of pony origin. To hide the crucial information from evil eyes, pony elders cast a spell on the scroll. That spell adds
CF1391E-Pairs of Pairs 题目: 题目描述: You have a simple and connected undirected graph consisting of $ n $ nodes and $ m $ edges. Consider any way to pair some subset of these $ n $ nodes such that no node is present in more than one pair. This pairing is valid if for every pair of pairs, the induced subgraph containing all $
CF1391D-505 题目: 题目描述: A binary matrix is called good if every even length square sub-matrix has an odd number of ones. Given a binary matrix $ a $ consisting of $ n $ rows and $ m $ columns, determine the minimum number of cells you need to change to make it good, or report that there is no way to make it good