10 2023 档案
摘要:构造矩阵 我们希望构造一个 的整数矩阵。 构造出的矩阵需满足: 每一行上的所有元素之积均等于 。 每一列上的所有元素之积均等于 。 保证 为 或 。 请你计算,一共可以构成出多少种不同的满足条件的矩阵。 由于结果可能很大,你只需要输出对
阅读全文
摘要:D. Counting Rhyme You are given an array of integers . A pair of integers , such that , is called go
阅读全文
摘要:D. Doremy's Connecting Plan Doremy lives in a country consisting of cities numbered from to , with people living in the -th city.
阅读全文
摘要:E. Segment Sum You are given two integers and (). Your task is to calculate the sum of numbers from to (including and
阅读全文
摘要:E. Time Travel Berland is a country with ancient history, where roads were built and destroyed for centuries. It is known that there always were c
阅读全文
摘要:Minimum Changes to Make K Semi-palindromes Given a string s and an integer k, partition s into k substrings such that the sum of the number of letter
阅读全文
摘要:D2. Dances (Hard Version) This is the hard version of the problem. The only difference is that in this version . You are given two arrays
阅读全文
摘要:B. Raspberries You are given an array of integers and a number (). In one operation, you can do the follo
阅读全文
摘要:C. Medium Design The array is initially filled with zeroes. You are given pairwise distinct segments $1 \le l_i \le r_i \l
阅读全文
摘要:koishi的数学题 题目描述 Koishi 在 Flandre 的指导下成为了一名数学大师,她想了一道简单的数学题。 输入一个整数 ,设 ,你需要输出 $f(1), f(2), \ldots , f(n
阅读全文
摘要:统计子矩阵 给定一个 的矩阵 ,请你统计有多少个子矩阵 (最小 ,最大 ) 满足子矩阵中所有数的和不超过给定的整数 ? 输入格式 第一行包含三个整数 和 。 之后 行每行包含 个整数,代表
阅读全文
摘要:[COCI2021-2022#6] Zemljište 题目描述 有一块地,大小为 , 想买下它。这块地每个 的正方形都有不同的价格。 设一片非空子矩阵价格总和为 ,则这片子矩阵的权值为 ,您需要找到
阅读全文
摘要:D. Professor Higashikata Josuke is tired of his peaceful life in Morioh. Following in his nephew Jotaro's footsteps, he decides to study hard and beco
阅读全文
摘要:D. Monocarp and the Set Monocarp has numbers and a set (initially empty). He adds his numbers to this set times in some order
阅读全文
摘要:Count of Sub-Multisets With Bounded Sum You are given a 0-indexed array nums of non-negative integers, and two integers l and r. Return the count of s
阅读全文
摘要:G. Anya and the Mysterious String Anya received a string of length brought from Rome. The string consists of lowercase Latin letters and a
阅读全文
摘要:C. Decreasing String Recall that string is lexicographically smaller than string if is a prefix of (and ), or there exists an
阅读全文
摘要:G. ABBC or BACB You are given a string made up of characters and . Initially you have no coins. You can perform two types
阅读全文
摘要:C. Card Game There are cards stacked in a deck. Initially, is written on the -th card from the top. The value written on a card does no
阅读全文
摘要:D. Sum of XOR Functions You are given an array of length consisting of non-negative integers. You have to calculate the value of $\sum_{l=1}^{
阅读全文
摘要:D. Effects of Anti Pimples Chaneka has an array . Initially, all elements are white. Chaneka will choose one or more different i
阅读全文
摘要:D. Prefix Purchase You have an array of size , initially filled with zeros (). You also have an array of integers
阅读全文
摘要:Python缩进 在 Python 中,代码块没有显式的开始/结束或大括号来标记代码块的开始和结束。 相反,代码块是通过缩进定义的。 我们考虑一个极其简化的 Python 子集,其只有两种类型的语句:简单语句和 语句。 简单语句(Simple statements)仅占一行,每行一个。
阅读全文