
字符串处理
无语_
无语
展开
-
FZU——2111Min Number(多次交换得到最小数,水题)
Problem 2111 Min Number Accept: 760 Submit: 1516 Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description Now you are given one non-negative integer n in 10-base notation原创 2016-03-30 22:13:40 · 565 阅读 · 0 评论 -
暑假训练Round1——G: Hkhv的水题之二(字符串的最小表示)
Problem 1057: Hkhv的水题之二 Time Limits: 1000 MS Memory Limits: 65536 KB 64-bit interger IO format: %lld Java class name: Main Description 杨神喜欢字符串,于是他写程序随机生成了n个长度不大于1原创 2016-07-10 23:14:46 · 591 阅读 · 0 评论 -
暑假训练round2 D: 好序列(Manacher)
Problem 1061: 好序列 Time Limits: 1000 MS Memory Limits: 65536 KB 64-bit interger IO format: %lld Java class name: Main Description 杨神觉得好的序列需要符合这两个条件 1.这段序列可以平均分成三段原创 2016-07-25 15:24:55 · 678 阅读 · 0 评论 -
Ural——1297Palindrome(Manacher)
1297. Palindrome Time limit: 1.0 second Memory limit: 64 MB The “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Un原创 2016-05-16 22:30:51 · 718 阅读 · 0 评论 -
HDU 2594 Simpsons’ Hidden Talents(KMP的Next数组应用)
Simpsons’ Hidden Talents Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6888 Accepted Submission(s): 2461 Problem Description H原创 2016-08-07 22:21:20 · 563 阅读 · 1 评论 -
HDU——2093考试排名(string类及其函数的运用以及istringstream)
#include #include #include #include #include #include using namespace std; struct stu { string na; string timu[13]; int fashi; int ac; }; int power(int n) { int i,sum=1; for (i=0; i<n; i++) {原创 2016-02-03 21:43:34 · 532 阅读 · 0 评论 -
HDU——2091空心三角形
把一个字符三角形掏空,就能节省材料成本,减轻重量,但关键是为了追求另一种视觉效果。在设计的过程中,需要给出各种花纹的材料和大小尺寸的三角形样板,通过电脑临时做出来,以便看看效果。 Input 每行包含一个字符和一个整数n(0 Output 每个样板三角形之间应空上一行,三角形的中间为空。显然行末没有多余的空格。 Sample Input X原创 2016-01-24 19:42:59 · 898 阅读 · 0 评论 -
ACM程序设计选修课——1076汇编语言(重定向+模拟)
1076: 汇编语言 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 34 Solved: 4 [Submit][Status][Web Board] Description Input Output Sample Input 2 3 MOV原创 2016-04-08 21:42:30 · 603 阅读 · 0 评论 -
ACM程序设计选修课——1057: Beautiful Garden(模拟+耐心调试)
1057: Beautiful Garden Time Limit: 5 Sec Memory Limit: 128 MB Submit: 25 Solved: 12 [Submit][Status][Web Board] Description There's a beautiful garden whose size is n × m in Edward's h原创 2016-04-04 12:13:55 · 622 阅读 · 0 评论 -
ACM程序设计选修课——1041: XX's easy problem(神烦的多次字符串重定向处理)
1041: XX's easy problem Time Limit: 1 Sec Memory Limit: 128 MB Submit: 41 Solved: 7 [Submit][Status][Web Board] Description XX is a good student who likes to ask questions.But sometimes w原创 2016-04-02 22:00:55 · 592 阅读 · 0 评论 -
HDU——4162Shape Number(字符串的最小表示)
Shape Number Time Limit: 24000/12000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1345 Accepted Submission(s): 647 Problem Description In computer原创 2016-05-15 00:22:05 · 467 阅读 · 0 评论 -
校赛——1096Is The Same?(KMP或字符串的最小、大表示法)
1096: Is The Same? Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 26 Solved: 8[Submit][Status][Web Board] Description 给出2个字符串S和T,如果可以通过循环移位使得S和T相等,则我们称S和T是同构字符串, 例如S=“abcd”, T=“bcda”,则S和T是同原创 2016-05-12 16:45:19 · 492 阅读 · 0 评论 -
ACM程序设计选修课——1065: Operations on Grids(暴力字符串)
1065: Operations on Grids Time Limit: 3 Sec Memory Limit: 128 MB Submit: 17 Solved: 4 [Submit][Status][Web Board] Description 你有一个 9 位数字串,现在你把这个数字的每一位填到 3 × 3 格子上。如果数 字是 123456789,那原创 2016-04-03 13:42:20 · 632 阅读 · 0 评论 -
广东工业大学2016校赛决赛重现——E积木积水(方法据说很多)
Problem E: 积木积水 Description 现有一堆边长为1的已经放置好的积木,小明(对的,你没看错,的确是陪伴我们成长的那个小明)想知道当下雨天来时会有多少积水。小明又是如此地喜欢二次元,于是他把这个三维的现实问题简化成二维的问题。设雨量无穷、积木不透水、积木间无缝连接,问在这个二次元的世界里,已放置好的积木会有多少单位的积水量? Input原创 2016-04-11 22:40:40 · 1139 阅读 · 0 评论 -
NOJ——1645聊天止于呵呵(string流重定向+map,水题)
[1645] 聊天止于呵呵 时间限制: 5000 ms 内存限制: 65535 K 问题描述 (现代版)俗话说:流言止于智者,聊天止于呵呵。输入一段聊天记录,你的任务是数一数有 多少段对话“止于呵呵”,即对话的最后一句话包含单词 hehe 或者它的变形。 具体来说,我们首先提取出对话的最后一句话,把所有非字母的字符替换成空格,把所有字符 替换成小写,然原创 2016-05-12 16:44:43 · 723 阅读 · 0 评论 -
LSU——1116Necklace(尺取)
1116 Necklace 通过率:5/23 难度系数:0时间限制:1000ms 内存限制:32000KB java 两倍。 介绍 Little King has a beautiful pearl necklace, one day, he find that there is a number in each pearl, so he want to know whether h原创 2016-05-12 16:44:12 · 444 阅读 · 0 评论 -
HDU——2609How many(字符串的最小表示法+substr)
How many Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1852 Accepted Submission(s): 763 Problem Description Give you n ( n How m原创 2016-03-09 12:36:04 · 507 阅读 · 0 评论 -
两种KMP题+KMP模版整理
最近稍微看了下KMP,不是很懂他们大神的A题姿势,但是模版总该还是要去学的。 其中next数组的求法有两处区别。 第一种:求主串中模式串的个数。HDU2087 剪花布条和HDU4847 Wow! Such Doge!。这两道都比较水可以暴力string::find函数过, 第一个代码: #include #include #include #include #include原创 2016-05-12 16:44:26 · 489 阅读 · 0 评论 -
Codeforces Round #354 (Div. 2)——C. Vasya and String(尺取)
C. Vasya and String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output High school student Vasya got a string o原创 2016-07-10 10:38:20 · 443 阅读 · 0 评论 -
ACM程序设计选修课——1030: Hungar的时尚球场(水题+耐心)
1030: Hungar的时尚球场 Time Limit: 1 Sec Memory Limit: 64 MB Submit: 14 Solved: 8 [Submit][Status][Web Board] Description 从NBA新秀训练中心回来以后,Hungar意识到自己的水平还不足以在NBA立足,于是他决定每天去球场练习。 这天他来到一个球场,却发现原创 2016-03-10 23:51:20 · 699 阅读 · 0 评论