CF1458A-Row GCD 题目: 题目描述: You are given two positive integer sequences $ a_1, \ldots, a_n $ and $ b_1, \ldots, b_m $ . For each $ j = 1, \ldots, m $ find the greatest common divisor of $ a_1 + b_j, \ldots, a_n + b_j $ . 输入格式: The first line contains two integers $ n $ and $
SP6286-SUMMUL - Sum of products 题目: 题目描述: One boy Petya decided to practice in addition and multiplication of numbers. For this he chose some positive integer n, and ordered all the ways to decompose it into two or more terms of positive integers, and the ways in different order terms are considered to be different (for example, for n = 3 there are three
CF1463F-Max Correct Set 题目: 题目描述: Let’s call the set of positive integers $ S $ correct if the following two conditions are met: $ S \subseteq {1, 2, \dots, n} $ ; if $ a \in S $ and $ b \in S $ , then $ |a-b| \neq x $ and $ |a-b| \neq y $ . For the given values $ n
CF1463E-Plan of Lectures 题目: 题目描述: Ivan is a programming teacher. During the academic year, he plans to give $ n $ lectures on $ n $ different topics. Each topic should be used in exactly one lecture. Ivan wants to choose which topic will he explain during the $ 1 $ -st, $ 2 $ -nd, …, $ n $ -th lecture — formally,
CF1463D-Pairs 题目: 题目描述: You have $ 2n $ integers $ 1, 2, \dots, 2n $ . You have to redistribute these $ 2n $ elements into $ n $ pairs. After that, you choose $ x $ pairs and take minimum elements from them, and from the other $ n - x $ pairs, you take maximum elements. Your goal is to obtain the
CF1463B-Find The Array 题目: 题目描述: You are given an array $ [a_1, a_2, \dots, a_n] $ such that $ 1 \le a_i \le 10^9 $ . Let $ S $ be the sum of all elements of the array $ a $ . Let’s call an array $ b $ of $ n $ integers beautiful if: $ 1 \le b_i \le 10^9 $