上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 53 下一页
摘要: C. Remove the Bracket RSJ has a sequence $a$ of $n$ integers $a_1,a_2, \ldots, a_n$ and an integer $s$. For each of $a_2,a_3, \ldots, a_{n-1}$, he cho 阅读全文
posted @ 2023-01-31 16:31 onlyblues 阅读(65) 评论(0) 推荐(0) 编辑
摘要: F. Timofey and Black-White Tree Timofey came to a famous summer school and found a tree on $n$ vertices. A tree is a connected undirected graph withou 阅读全文
posted @ 2023-01-30 19:01 onlyblues 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 斐波那契前 n 项和 大家都知道 Fibonacci 数列吧,$f_1=1,f_2=1,f_3=2,f_4=3, \ldots ,f_n=f_{n−1}+f_{n−2}$。 现在问题很简单,输入 $n$ 和 $m$,求 $f_n$ 的前 $n$ 项和 $S_n \bmod m$。 输入格式 共一行, 阅读全文
posted @ 2023-01-28 17:04 onlyblues 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 最幸运的数字 $8$ 是中国的幸运数字,如果一个数字的每一位都由 $8$ 构成则该数字被称作是幸运数字。 现在给定一个正整数 $L$,请问至少多少个 $8$ 连在一起组成的正整数(即最小幸运数字)是 $L$ 的倍数。 输入格式 输入包含多组测试用例。 每组测试用例占一行,包含一个整数 $L$。 当输 阅读全文
posted @ 2023-01-28 11:45 onlyblues 阅读(78) 评论(0) 推荐(0) 编辑
摘要: B. GCD Partition While at Kira's house, Josuke saw a piece of paper on the table with a task written on it. The task sounded as follows. There is an a 阅读全文
posted @ 2023-01-27 17:16 onlyblues 阅读(56) 评论(0) 推荐(0) 编辑
摘要: D. Fixed Prefix Permutations You are given $n$ permutations $a_1, a_2, \dots, a_n$, each of length $m$. Recall that a permutation of length $m$ is a s 阅读全文
posted @ 2023-01-27 16:23 onlyblues 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Rank Transform of a Matrix Given an m x n matrix , return a new matrix answer where answer[row][col] is the rank of matrix[row][col] . The rank is an 阅读全文
posted @ 2023-01-25 16:47 onlyblues 阅读(25) 评论(0) 推荐(0) 编辑
摘要: Minimum Cost to Split an Array You are given an integer array nums and an integer $k$. Split the array into some number of non-empty subarrays. The co 阅读全文
posted @ 2023-01-22 12:51 onlyblues 阅读(24) 评论(0) 推荐(0) 编辑
摘要: B. Emordnilap A permutation of length $n$ is an array consisting of $n$ distinct integers from $1$ to $n$ in arbitrary order. For example, $[2,3,1,5,4 阅读全文
posted @ 2023-01-22 10:13 onlyblues 阅读(36) 评论(0) 推荐(0) 编辑
摘要: C. Quiz Master A school has to decide on its team for an international quiz. There are $n$ students in the school. We can describe the students using 阅读全文
posted @ 2023-01-22 09:40 onlyblues 阅读(251) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 53 下一页
Web Analytics