摘要:题目 https://codeforces.com/problemset/problem/1913/C In this problem, you are initially given an empty multiset. You have to process two types of queri
阅读全文
摘要:题目 You are given an array consisting of positive integers. You can perform the following operation on it: Choose a pair of elements \(a_i\
阅读全文
摘要:题目 小苯有一个长度为的字符串,每次操作他可以选择一个位置的字母将其的大小写反转,也就是说如果字符是小写,则操作后会变成大写,如果字符是大写则反之。 他现在希望将变为:“前面若干字符是大写,后面的字符全是小写”的样子,例如:"AABBccdd"。(注意:全大写和全小写均
阅读全文
摘要:题目 给定一个数组,试求有多少个长度为的连续子数组是排列。 https://ac.nowcoder.com/acm/problem/273933 Input 第一行输入两个正整数,,代表小红拿到的数组大小和连续子数组的大小。 第二行输入个正整数,
阅读全文
摘要:题目 给定一个长度为n的数组,试复原长度为n的排列 其中,也就是说,表示排列中前个数字的最大公约数。 (由于数组可能是错误的,故有可能无解,此时输出即可) http
阅读全文
摘要:题目 Given an integer , find the number of lattice points that have a Euclidean distance from greater than or equal to but strictl
阅读全文
摘要:题目 现有n扇门,门之间有m种关系,门与门之间可以互相传送。将所有不能被传送到的门视为起点,将不能传送到其他门的门视为终点,利用这些传送关系,求出有多少种路线。 结果可能很大,请对998244353取模。 https://ac.nowcoder.com/acm/contest/82881/B Inp
阅读全文