随笔分类 - 题库—牛客
摘要:链接:https://ac.nowcoder.com/acm/contest/11255/I 来源:牛客网 题目描述 For a sequence t1...nt1...n, we define the weight of it is the number of pairs (i,j)(i,j) s
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11255/C 来源:牛客网 题目描述 Let LCS(s1,s2)LCS(s1,s2) denote the length of the longest common subsequence (not necessary
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11255/J 来源:牛客网 题目描述 Bob has an n×mn×m matrix WW. This matrix is very special, It's calculated by two sequences
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11254/B 来源:牛客网 题目描述 Goodeat has a white chessboard with n rows and m columns. Each grid (i, j) has a weight c(i
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11254/E 来源:牛客网 题目描述 Given n, count the number of pairs of positive integers (x, y), such that xy+1∣x2+y2,1≤x≤y≤
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11254/J 来源:牛客网 题目描述 Goodeat finds an undirected complete graph with n vertices. Each edge of the graph is paint
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11253/K 来源:牛客网 题目描述 ZYT had a magic permutation a1,a2,⋯ ,ana1,a2,⋯,an, and he constructed a sequence b1,b2,⋯bnb
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11253/F 来源:牛客网 题目描述 ZYT and ZFeT are great PUAs and both have two girlfriends,but they never think that their g
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11213/C 来源:牛客网 题目描述 小F对杨辉三角颇有研究,他把杨辉三角第nn行的数提出来,从左到右分别为a[0],a[1],...,a[n−1]a[0],a[1],...,a[n−1]。 现在他想知道∑i=0n−1i
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11213/F 来源:牛客网 题目描述 在中国象棋中正所谓新手玩车,熟手玩炮,老手玩马,由此可见象棋中炮的地位还是比较高的。 给定一个n×mn×m的棋盘,全部摆满炮,我们视所有炮都不属于同一阵营,他们之间可以相互攻击但不能
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11213/E 来源:牛客网 题目描述 有nn名选手会进行mm次比赛,每次比赛不会出现平局的情况,只会有一个胜者。在每次比赛完成之后,我们视胜者选手的实力比败者选手的实力强,如果出现选手AA打败选手BB,选手BB打败选手C
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11213/B 来源:牛客网 题目描述 给定22个由小写字母和问号组成的字符串aa与bb,问号代表你想要的任何字符。 请你找出最短的字符串ss,要求ss包含aa和bb两个字符串,你只需要输出ss的长度即可。 输入描述: 第
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/10662/A 来源:牛客网 We call a matrix "01 Square" if and only if it's a N×NN×N matrix and its elements are all 00 or
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11176/B 来源:牛客网 题目描述 A + B ProblemA + B Problem 往往是大家在各Online JudgeOnline Judge通过的第一道题目,刚刚学会写程序的嘟嘟也不例外。然而,单纯的读入两
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11176/C 来源:牛客网 题目描述 某个国家的货币体系里有 nn 种面值不同的纸币,从小到大面值分别是 a1,a2,...,ana1,a2,...,an,a1=1a1=1。 当取款人去 ATMATM 机取款 cc 元的
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11233/B 来源:牛客网 题目描述 给出一个仅包含 a,b 的字符串 A。在 A 中间任意位置(包括开头结尾)插入一个字符,最大化 aab 作为子序列(可以不连续)在 A 中出现的次数。 输入描述: 第一行一个仅包含
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11211/B 来源:牛客网 题目描述 星际中有nn个空间站,任意两个空间站间可以相互跳跃,由空间站xx跳跃到空间站yy所需要的代价为P[x][y]P[x][y],注意不保证p[x][y]=p[y][x]p[x][y]=p
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11211/A 来源:牛客网 A. 题目描述 大科学家dddd最近在研究转基因白菜,白菜的基因序列由一串大写英文字母构成,dddd经过严谨的推理证明发现,只有当白菜的基因序列呈按位非递减形式时,这株白菜的高附加值将达到最高
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11173/B 来源:牛客网 题目描述 由于小 LL 追女孩子的时间不多了,于是这里只有简单版题意。 共有 TT 组询问,每次给定 l,rl,r ,你需要求出在 [l,r][l,r] 中有多少个数在二进制下 11 的个数有
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/problem/51073 来源:牛客网 题目描述 Urej loves to play various types of dull games. He usually asks other people to play with him
阅读全文