ACM_字符串
zz你的名字
不奢望过多,只希望未来的自己没有过多的遗憾。
展开
-
nbut1217 Dinner
Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, knife and other tableware is not enough in the kitchen, Li原创 2017-04-08 23:27:44 · 506 阅读 · 0 评论 -
hdu2594
hdu2594 hash板子题#include<stdio.h>#include<string.h>#include<string>#include<set>#include<iostream>#include<algorithm>using namespace std;const int maxx=500...原创 2018-03-19 20:26:17 · 331 阅读 · 0 评论 -
UVA - 10815
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1756 题意:输入一篇文章,把每个单词记录一下,大写全转化为小写,相同只记录一个,然后排序输出。 方法:需要注意的就是当字母前出现符号和字母后出现符号需要处理一下。#include<stdio.原创 2017-07-31 16:27:20 · 317 阅读 · 0 评论 -
对gets()和scanf的认识
C语言 gets()和scanf()函数的区别scanf( )函数和gets( )函数都可用于输入字符串,但在功能上有区别。若想从键盘上输入字符串"hi hello",则应该使用__gets__函数。gets可以接收空格;而scanf遇到空格、回车和Tab键都会认为输入结束,所有它不能接收空格。char string[15]; gets(string); /*遇到回车认为输入结转载 2016-11-14 23:30:14 · 315 阅读 · 0 评论 -
字符串逆序输出
#include#include//定义字符串int main(){ char str[100000]; int n,j; scanf("%d",&n); getchar();//吸收空格,注意位置,加 : while(n--) { gets(str);//这样定义gets(str);表示从键盘接收一个字原创 2016-10-25 15:49:09 · 412 阅读 · 0 评论 -
“玲珑杯”线上赛 Round #15 河南专场 F 咸鱼文章
elttiL moT nwod eht teerts sllac ruo god ” ehT peek god ” . piZ si a peehs god . tuB nehw moT seirt ot yas ” peeS ” , ti semoc tuo ” peek ” . dnA ni a yaw moT si thgir . piZ si syawla gnignirb sgniht o原创 2017-06-03 09:11:45 · 648 阅读 · 0 评论 -
substr
#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<iostream>#include<algorithm>using namespace std;int main(){ string s("0123456789"); string s1=s.substr(0);//只有原创 2017-05-22 14:22:59 · 291 阅读 · 0 评论 -
poj3087 Shuffle'm Up
A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack containing C chips. Eac原创 2017-05-22 14:16:59 · 641 阅读 · 1 评论 -
将字符串str1复制为字符串str2的三种解决方法
http://www.jb51.net/article/42165.htm 1.自己编写函数,将两个字符串进行复制#include<iostream>using namespace std;int main(){ char str1[]="I love China!",str2[20]; void Strcpy(char *p1,char *p2); Strcpy(str2,转载 2017-05-04 15:10:26 · 10197 阅读 · 1 评论 -
cf 410
A. Mike and palindrome time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Mike has a string s consisting of only lowercase English letters. H原创 2017-04-29 17:06:13 · 476 阅读 · 0 评论 -
hdu5007 Post Robot
Post RobotTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1924 Accepted Submission(s): 1362Problem DescriptionDT is a big fan原创 2017-04-12 21:10:33 · 483 阅读 · 0 评论 -
NBUT[1220] SPY
问题描述 The National Intelligence Council of X Nation receives a piece of credible information that Nation Y will send spies to steal Nation X’s confidential paper. So the commander of The National Intel原创 2017-04-09 20:28:54 · 489 阅读 · 0 评论 -
HDU 1251 统计难题
HDU 1251 中文题意,不再说了。 字典树裸题,比赛时用的指针实现的导致MLE||RE很难受。赛后套了一下数组实现的直接A了。思想大家也理解了。具体 说一下数组如何实现。//ZQW写法#include <iostream>#include <string.h>#include <stdio.h>#include <algorith...原创 2018-04-17 20:28:48 · 189 阅读 · 0 评论