C    HDU_5578 求字符串中所有相同字母的最小距离H. Input 实例个数T然后T行字符串字符串中仅含有小写字母.1≤T≤501≤len≤1000(len为字符串长度) Output 对于每个实例输出Case #t: H,表示第t个实例的答案是H. 如果没有相同的字母,H=-1. Sample Input 2 ac wxzayzxw Sample Output Case #1: -1 Case #2: 3 纯模拟_两层循环 #include <iostream> #includ…
串的简单处理 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 39  Solved: 11[Submit][Status][Web Board] Description 串的处理在实际的开发工作中,对字符串的处理是最常见的编程任务.本题目即是要求程序对用户输入的串进行处理.具体规则如下:1.    把每个单词的首字母变为大写.2.    把数字与字母之间用下划线字符(_)分开,使得更清晰3.    把单词中间有多个空格的调整为1个空格. Input…
11.9 线段树 http://acm.hdu.edu.cn/showproblem.php?pid=6315 求逆序对个数 http://acm.hdu.edu.cn/showproblem.php?pid=6318 必赢博弈 http://acm.hdu.edu.cn/showproblem.php?pid=6312 欧拉回路 http://acm.hdu.edu.cn/showproblem.php?pid=6311 好难的构造题目 http://acm.hdu.edu.cn/showpr…
n a^o7 ! Time Limit: 1000MS Memory limit: 65536K 题目描述 All brave and intelligent fighters, next you will step into a distinctive battleground which is full of sweet and happiness. If you want to win the battle, you must do warm-up according to my inst…
Identifiers Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Identifier is an important concept in the C programming language. Identifiers provide names for several language elements, such as functions, variables, labels, etc. An identifie…
Zhuge Liang's Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 59    Accepted Submission(s): 47 Problem Description In the ancient three kingdom period, Zhuge Liang was the most famous a…
Shopping Time Limit: 1000MS Memory limit: 65536K 题目描述 Saya and Kudo go shopping together.You can assume the street as a straight line, while the shops are some points on the line.They park their car at the leftmost shop, visit all the shops from left…
分析:就是判断简单的前缀有没有相同,注意下自身是m的倍数,以及vis[0]=true; #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <algorithm> #include <map> #include <queue> #include <vect…
Hello World! Time Limit: 1000MS Memory limit: 65536K 题目描述 We know that Ivan gives Saya three problems to solve (Problem F), and this is the first problem.“We need a programmer to help us for some projects. If you show us that you or one of your frien…
哈哈哈哈哈哈哈,最近一直在补题,改各种错误的代码,wa了20多遍,改到心态爆炸,改好之后,感觉世界都美好了(叉会腰~)... A. Who is the winner? time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output A big marathon is held on Al-Maza Road, Damascus. Runners…