随笔分类 - 题库—牛客
摘要:A. R 链接:https://ac.nowcoder.com/acm/contest/23479/A 来源:牛客网 题目描述 小红拿到了一个长度为 nn 的字符串,该字符串仅由大写字母组成。 小红很喜欢红色(用'R'字母表示),但她非常讨厌紫色(用'P'字母表示)。 她想取一个连续子串,该子串包含
阅读全文
摘要:A. 智乃的Hello XXXX 随便输出Hello xxx即可。 B. 智乃买瓜 链接:https://ac.nowcoder.com/acm/contest/23478/B 来源:牛客网 题目描述 有一人前来买瓜。 “哥们儿,这瓜多少钱一斤呐” “两块钱一斤” “What's up,这瓜皮是金子
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/23477/G 来源:牛客网 题目描述 小沙发现他打球打不赢别人,打架也打不赢别人,所以他去了少林寺学习身法,以求打球的时候可以跑的更快,打架的时候也可以跑的更快(bushi)。 少林寺的方丈告诉小沙,他这种情况可
阅读全文
摘要:A. 小沙的炉石 链接:https://ac.nowcoder.com/acm/contest/23477/A 来源:牛客网 题目描述 小沙热衷于玩决斗法,今天他和他的弟弟玩起了炉石,弟弟特别特别的菜,但是为了照顾弟弟的自尊心,所以小沙想要恰好将弟弟斩杀。 恰好斩杀:弟弟的血量恰好变成0。 小沙当前
阅读全文
摘要:A. 小沙的炉石 链接:https://ac.nowcoder.com/acm/contest/23477/A 来源:牛客网 题目描述 小沙热衷于玩决斗法,今天他和他的弟弟玩起了炉石,弟弟特别特别的菜,但是为了照顾弟弟的自尊心,所以小沙想要恰好将弟弟斩杀。 恰好斩杀:弟弟的血量恰好变成0。 小沙当前
阅读全文
摘要:很久没做题,赛时A了9道加起来WA了16发...剩下三道待补 A. 九小时九个人九扇门 链接:https://ac.nowcoder.com/acm/contest/23106/A 来源:牛客网 题目描述 在打越钢太郎的著名解谜游戏系列《极限脱出》的第一作《九小时九个人九扇门》中,有这样一个有趣的设
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11221/E 来源:牛客网 题目描述 幽怨火,憎恨焰,变异蛮牛续执念。 给定一棵根为 11,且是黑点的有根树。 每个白点相邻所有的点都是黑点,每个黑点相邻所有的点都是白点。换句话说,你可以从根结点开始,按照深度对每个点黑
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11185/C 来源:牛客网 题目描述 给出一个正整数序列 [a1…an][a1…an] 以及定值 kk,每次可以选择一个区间 [l,r] (r−l+1≥k)[l,r] (r−l+1≥k),把这个区间内的 aiai 除以二
阅读全文
摘要:题目描述 现给定 n 个数 {ai}{ai} 和 m 个关系。 第 i 个关系形如 (x, y)。请你重排 {ai}{ai},使得 ∑i=1m(axi−ayi)i=1∑m(axi−ayi) 最小。 你只需要输出这个最小值即可。 输入描述: 一行两个数 n,m(1≤n,m≤105)n,m(1≤n,m≤
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11261/F 来源:牛客网 题目描述 You are now the coordinator for the Nonexistent Old Railway Station! The Nonexistent Old Ra
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11256/D 来源:牛客网 题目描述 Given two strings A,BA,B, and little H wants to choose a subsequence from {1,2,⋯ ,∣A∣}{1,2,
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11259/K 来源:牛客网 题目描述 On a distant planet of dreams, Toilet-Ares is packing up the things and memories, ready to
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11259/D 来源:牛客网 题目描述 There are two sequences of length n−1n−1, b=(b2,b3,…,bn)b=(b2,b3,…,bn), c=(c2,c3,…,cn)c=(c2
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11256/J 来源:牛客网 题目描述 There are nn jewels under the sea, and you want to salvage all the jewels. Image that the s
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11258/H 来源:牛客网 题目描述 xay has an array a of length n, he wants to know how many triples (i, j, k) satisfy ai×aj=a
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11257/H 来源:牛客网 题目描述 Little Rabbit loves hopping. He always hops around on the grassland. But dangers are lurkin
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11257/F 来源:牛客网 题目描述 Riko is ready to cook hamburger steaks. There are mm pans and nn hamburger steaks that need
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11256/B 来源:牛客网 题目描述 There're nn boxes in front of you. You know that each box contains a ball either in white o
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11255/E 来源:牛客网 题目描述 Bob has a tree with nn nodes and the weight of i-th node is wiwi. But Bob forgot w1...nw1..
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/11255/F 来源:牛客网 题目描述 Alice and Bob are playing a game. At the beginning, there is an undirected graph GG with nn
阅读全文