随笔分类 - 字符串
摘要:链接:https://ac.nowcoder.com/acm/contest/558/A来源:牛客网 A.串串 小猫在研究字符串。 小猫在研究字串。 给定一个长度为N的字符串S,问所有它的子串Sl…r(1≤l≤r≤N),去重后有多少种。 小猫在研究字符串。 小猫在研究字串。 给定一个长度为N的字符串
阅读全文
摘要:C. Postcard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Andrey received a postcard fr
阅读全文
摘要:P2 : Heshen's Account Book P2 : Heshen's Account Book Time Limit:1000ms Case Time Limit:1000ms Memory Limit:512MB Description Heshen was an official o
阅读全文
摘要:Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) A. Single Wildcard Pattern Matching 题意就是匹配字符的题目,打比赛的时候没有看到只有一个" * ",然后就写挫了,
阅读全文
摘要:6357. Hills And Valleys 自己感觉这是个好题,应该是经典题目,所以半路选手补了这道字符串的动态规划题目。 题意就是给你一个串,翻转任意区间一次,求最长的非下降子序列。 一看题面写的0≤Ai≤9 (i=1,2,⋯,n).就知道肯定有点东西,只要这么写,肯定就是有某个神奇的操作可以
阅读全文
摘要:HDU6301.Distinct Values 这个题就是给你区间要求区间内的数都不相同,然后要求是字典序最小,直接贪心走一遍,但是自己写的时候,思路没有错,初始化写挫了。。。 将区间按左端点小的排序,如果相同就按右端点大的排序,因为右端点大的肯定满足右端点小的。然后直接标记数组记录当前区间已有的数
阅读全文
摘要:C.真真假假 链接:https://www.nowcoder.com/acm/contest/86/C 这个题真的是无敌的水,但是自己写前面的string数组的时候,里面的这些头文件要用双引号(" ")括起来,敲双引号敲到手抽筋,超级暴力的写法,还被对面的瓜皮骂了一句(嫌我操作太秀。。。) 代码:
阅读全文
摘要:C. String Transformation time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. String Transf
阅读全文
摘要:Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 24711 Accepted: 12882 Description The little cat is so famous,
阅读全文
摘要:D.YB要打炉石 D.YB要打炉石 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld 链接:https://www.nowcoder.com/acm/contest/74/D来源:牛客网 题目描述 Wozuin
阅读全文
摘要:这个题就是从字符串中删除一个字符,然后剩下的是回文串。 我写的代码虽然长得好看,但是循环里面的比较条件容易想错,太智障了。。。 一开始写的是计数比较,但是有的时候下标相同的也比较了,为了简单一些,直接看有没有条件不成立的,这样就少想好多东西(偷懒为主,嘻嘻嘻)。 代码:
阅读全文
摘要:E. The Architect Omar time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output Architect Omar is responsible
阅读全文
摘要:C.Cheering To boost contestants' performances in the 20th La Salle - Pui Ching Programming Challenge, the organizers have bought N robots to cheer for
阅读全文
摘要:Little Zu Chongzhi's Triangles Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 2515 Accepted Su
阅读全文
摘要:Song Jiang's rank list Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 2006 Accepted Submission
阅读全文
摘要:A. Scarborough Fair time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Scarborough Fair
阅读全文
摘要:补的若干年以前的题目,水题,太菜啦_(:з」∠)_ B. Petya and Exam time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard out
阅读全文
摘要:好久好久好久之前的一个题,今天翻cf,发现这个题没过,补一下。 B. Mike and strings time limit per test 2 seconds time limit per test memory limit per test 256 megabytes memory limit
阅读全文
摘要:C. Palindrome Again !! time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output C. Palindrome Again
阅读全文
摘要:Common Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 39661 Accepted Submission(s):
阅读全文